Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage failure selectByHsv, #38

Closed
EmakefunAurora opened this issue May 17, 2019 · 9 comments
Closed

Usage failure selectByHsv, #38

EmakefunAurora opened this issue May 17, 2019 · 9 comments
Assignees

Comments

@EmakefunAurora
Copy link

Please complete the following information:

  • Library Version 2.1.1
  • Affected Device(s) [millet 5s with Android 8.0]

Describe the Bug:
Hello, I call the method [colorPickerView. selectByHsv (color)]. It was found that [selectedColor = getColorFromBitmap (x, y);] This line of code always gets a value of 0. Excuse me, why is this?

Expected Behavior:
I expect to specify the position of the palette with the color as the parameter

image

@skydoves skydoves self-assigned this May 29, 2019
@skydoves
Copy link
Owner

@EmakefunAurora
The selectByHsv method will works correctly on version 2.1.4!
Thank you for your issue :)

@EmakefunAurora
Copy link
Author

Thank you for your reply. This method of selectByHsv can be used normally, but there seems to be some problems in accuracy. What's the solution, please?
image
image
image
image

@JaeHunJang
Copy link

In my opinion, the palette used is a problem.
After testing, we found a similar solution in the following palette.
palette_hsv3_c

@skydoves
Copy link
Owner

@EmakefunAurora
Sorry for the late reply.
It is released a new version 2.1.5.
I think it seems working correctly.
But there is a constraint for using the selectByHsv method.
The palette should be used the default palette in the internal ColorPickerView.
And here is the demo project.
Thank you for your issue and comment to me if the solution still has some problems. :)

@EmakefunAurora
Copy link
Author

EmakefunAurora commented Jun 17, 2019 via email

@skydoves
Copy link
Owner

@EmakefunAurora
You can show the slide bar vertically using the below method.

android:rotation="90"

@EmakefunAurora
Copy link
Author

EmakefunAurora commented Jun 18, 2019 via email

@skydoves
Copy link
Owner

@EmakefunAurora
I think you should set the width clearly like below.

<com.skydoves.colorpickerview.sliders.AlphaSlideBar
        android:id="@+id/alphaSlideBar"
        android:layout_width="250dp"
        android:layout_height="wrap_content"
        android:rotation="90" 
        app:borderColor_AlphaSlideBar="@android:color/darker_gray"
        app:borderSize_AlphaSlideBar="5"
        app:selector_AlphaSlideBar="@drawable/wheel" />

Or If the example has still a problem could you make me a sample project?

@skydoves
Copy link
Owner

Finally, this issue was fixed in the new release 2.1.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants