Hi, I am building a new version of my color picker program in VB2019 (I built a very basic version in VB6). I have successfully converted the RGB values to HSL, but cannot figure out how to convert to HSV.
I get the RGB from sliders which change the value in the appropriate textbox and changes the backcolor of a picturebox accordingly.
The values are to be displayed in seperate textboxes for Hue, Saturation and Value.
Hi Kevin. I've never done this myself, but here's a page I found with a quick Google search that shows the math behind how to get it done: RGB to HSV Color Conversion
I remember the original VB6 app, looking forward to seeing a few screenshots of the new one. I’ve not tested the above links but could be useful to look into a few namespaces, I’d be surprised if there wasn’t already a nuget that would wrap it in a simple API, seems like something people would want to do often in drawing programs.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visual Basic Forum.