Loading...
Logo
Processing Forum

HSB to RGB

in Programming Questions  •  2 years ago  
Hi there, 

I am creating a little color wheel/palette software with processing (will release the code when it start making sense ;) )  and I use the HSB color mode to simplify the calculation of the color wheel. 

Now I would like to display the RGB of the colors but the only data I have is the HSB, is there a simple way to display these data ? and does anyone know if there was a colorwheel/palette software created in processing ?  

I would like to create my own color tool since there doesn't seems to be a solid open source cross platform software that handle that elegantly (yet there is a lot of website that has really good tools) 

thanks ! 

Replies(3)

Re: HSB to RGB

2 years ago
you can always extract the rgb values of a color by using red(color), green(color), blue(color)

Re: HSB to RGB

2 years ago
You can also use the Java class Color e.g.

int myColor = Color.HSBtoRGB(h, s, b);

where h, s and b are in the range 0.0 to 1.0

Re: HSB to RGB

2 years ago
sweet - thanks ! that was easy :) 

will provide the code when the tools is enjoyable (and useful) ! 

:)