RGB : the Red-Green-Blue value of a Color. RGB values are integers (byte values) from 0 to 255.
So RGB is a three byte value with 256x256x256=16,777,216 possible values.
HSB : the Hue-Saturation-Brightness is a different way of indication of color. Values are measured in floating-point
from 0.0 to 1.0 .
There are mathematical algorithms in converting between RGB and HSB.
- Hue is the actual color in the spectrum. Assume it to be a degree value from 0 to 360
- Saturation is the amount of that color. Assume values from 0 to 100.
Low saturation results in pastel colors, high saturation results in vibrant colors.
- Brightness is the lightness or darkness of the color. Assume values from 0 to 100.
No brightness is black, full brightness is white.
And here is the java source code for those who are interested...