B4A Library [B4X] [XUI] HSV Colour bar

I have taken Erel's HSV Colour Picker https://www.b4x.com/android/forum/threads/b4x-xui-hsv-color-picker.91058/ and converted it into a bar as his picker was too large for my app. It is really a Hue picker.

You can have either horizontal or vertical orientation.

The code is still a little bit messy.

I have also added a SetSelectedRGBColor

Requires BitmapCreator and XUI libraries.


upload_2019-2-13_15-4-42.png
 

Attachments

  • HSVColorBar.zip
    12 KB · Views: 307

Ilya G.

Active Member
Licensed User
Longtime User
Strange behavior of the component when set HSVColorBar1.SetSelectedRGBColor(-65307), how to deal with it?
 

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Hi,
They way that the code handles the roundtrip colour space translation between RBG and HSV is not perfect. You have stumbled across one of the issues there.

You can see the same problem if you move the horizontal bar, which sets the color of the vertical bar.

It was enough for the project I was working on and I never have come back to see if it can be fixed.

If I get a chance, I will update in the near future.
 

Ilya G.

Active Member
Licensed User
Longtime User
I cannot use the dialog, this does not fit into the concept of the application, I need a view located on the form
 
Top