HSB : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

HSB
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 PaintShop 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
0.2125*r/255 + 0.7154*g/255 + 0.0721*b/255
Some
(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 select palette Alphabetically (140) select palette BHS: by Brightness, Hue, Saturation select palette HBS: by Hue, Brightness, Saturation select palette SBH: by Saturation, Brightness, Hue select palette Java AWT Colours (16,777,216)
select palette RGB: Numerically (140) select palette BSH: by Brightness, Saturation, Hue select palette HSB: by Hue, Saturation, Brightness select palette SHB: by Saturation, Hue, Brightness select palette Java Swing Colours (16,777,216)
Numbered Colours select palette HTML 3.2 (16) select palette Websafe (216) select palette Rainbow (4096) select palette Spectrum (401) select palette X11 (657)
Selected Colours select palette Pale (256) select palette Dark (2022) select palette Simple (105) select palette Greys (256) select palette Colour Schemes

This page is posted
on the web at:

http://mindprod.com/jgloss/hsb.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\hsb.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[52.14.140.108]
You are visitor number