HSB : Java Glossary
home H words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
HSB
Hue Saturation Brightness. An alternative Java supports to RGB (Red Green Blue) for specifying colour. Java defines HSB as three floating point numbers between 0. and 1. Note that Java’s definition does not match Paint Shop Pro’s definition, even if you scale HSB to 0..255.

Hue

Roughly hue represents the position on the rainbow or colour wheel, only loosely related to the frequency or wavelength of the simulated colour. The colours coming from the screen are not actually varying wavelength, but combinations or red, green and lue that trick you eye into thinking they are seeing different frequencies of light. It works because of the biology of your eye’s sensor cells.


hue spectrum
frequency spectrum

Saturation

Saturation is a measure how white the colour is, how broad the spectrum. The more washed out a colour is with white, the less saturated it is.

Brightness

Subjectively brightness just measures how much light in coming from the screen when it displays that colour, the amplitude of the light waves. Java defines brightness as:
max(r, g, b) / 255
A more accurate measure for typical monitors would be:
0.2125*r/255 + 0.7154*g/255 + 0.0721*b/255
Some people define it as:
(r + g + b ) / (3 * 255)

Equivalence

You can generate an RGB-HSB equivalence table with the little application below.

You can play with Rich Franzen’s colourwheel Applet to sharpen your HSB intuition.

Click any ball to view the corresponding colour palette.

Named Colours button Alphabetically (113) button BHS: by Brightness, Hue, Saturation button HBS: by Hue, Brightness, Saturation button SBH: by Saturation, Brightness, Hue button Java AWT Colours (16,777,216)
button RGB: Numerically (113) button BSH: by Brightness, Saturation, Hue button HSB: by Hue, Saturation, Brightness button SHB: by Saturation, Hue, Brightness button Java Swing Colours (16,777,216)
Numbered Colours button HTML 3.2 (16) button Websafe (216) button Rainbow (4096) button Spectrum (401) button X11 (657)
Selected Colours button Pale (256) button Dark (2022) button Simple (105) button Greys (256) button Colour Schemes


CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.16] Visit Western Canada Wilderness Committee
You are visitor number 10,707.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/hsb.html J:\mindprod\jgloss\hsb.html