selectByHsvColor() not working
See original GitHub issue- Library Version [e.g. v2.2.3] (tried multiple versions)
- SDK 30
Describe the Bug:
When I try to selectByHsvColor()
I get an error saying:
selectByHsvColor(@ColorInt int color) can be called only when the palette is an instance of ColorHsvPalette. Use setHsvPaletteDrawable();
But when I try to setHsvPaletteDrawable()
I get an error:
java.lang.IllegalArgumentException: width and height must be > 0
at android.graphics.Bitmap.createBitmap(Bitmap.java:1113)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1080)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1030)
at android.graphics.Bitmap.createBitmap(Bitmap.java:991)
at com.skydoves.colorpickerview.ColorPickerView.setHsvPaletteDrawable(ColorPickerView.java:741)
I don’t use a custom Palette Drawable.
I have my ColorPicker in my main activity like this:
<com.skydoves.colorpickerview.ColorPickerView
android:layout_width="300px"
android:layout_height="300px"
android:id="@+id/colorPickerView"
>
</com.skydoves.colorpickerview.ColorPickerView>
Expected Behavior:
selectByHsv()
should work since I don’t use custom Palette Drawable.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Choosing the correct upper and lower HSV boundaries for ...
To find a color, usually just look up for the range of H and S , and set v in range(20, 255). To...
Read more >Color Filtering/Segmentation/Detection – HSV - Computer Vision
Now using inRange() function, we will filter all the colors that are in between the range of lower and upper boundaries. For example...
Read more >5.3. Color Picker - GIMP Documentation
The Color Picker Tool is used to select a color on any image opened on your screen. By clicking a point on an...
Read more >Color Picker — Blender Manual
The color picker is a pop-up that lets you define a color value. Holding Ctrl while dragging snaps the hue to make it...
Read more >Color - Scripting API - Unity - Manual
This structure is used throughout Unity to pass colors around. Each color component is a floating point ... HSVToRGB, Creates an RGB colour...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@skydoves, thanks that worked. Might want to integrate that into the
setHsvPaletteDrawable
call itself and release a new version with that.Hey @KingVanti, Could you build with like this?
Thanks!