1.

Solve : Converting large amount of colors?

Answer»

Hello

I have a list of 121 colors in RGBA format saved in a text file which i WANT to convert to HSB where ALPHA would be used for brightness (and save the colors in another file)

Is there an EASY way to do that?I guess not?..You want to convert between a color value in RGB (three integer values in the range 0 to 255 representing red, green, and blue) and HSB (three floating point values in the range 0 to 1.0 representing hue, saturation, and brightness)?

http://www.exampledepot.com/egs/java.awt/color_Hsb.html

Partly, let me give an example:

RGBA:
R: 31
G: 97
B: 88
A: 100

HSL:
H: 155
S: 124
L: 100

(L and A MATCHES, as you can see)

Note: These values ranges from 0 to 255Sorry for double post, but, i got it solved



Discussion

No Comment Found