Colour Table in JavaScript

LA home
Computing
ProgLangs
 JavaScript
  Images
   Colours

63=216 which is less than 256, indeed 6 is the largest integer whose cube has this property. Also, 255/5=5110=3316 so we have six values spanning 0..25510, i.e. 010, 5110, 10210, 15310, 20410, 25510 or 016, 3316, 6616, 9916, CC16, FF16. These values can be used as the basis of an RGB colour table which will always work "quite well" on machines that use 8-bit graphics and gif-style colour tables.

Quite what you see below depends very much on your computer, your browser, its current image settings and possibly also the operating system. The following TABLE is computed by JavaScript which sets the BGCOLOR attribute of the TABLE cells.

Also take a Java look at the Colour Cube.

www #ad:

↑ © L. Allison, www.allisons.org/ll/   (or as otherwise indicated).
Created with "vi (Linux)",  charset=iso-8859-1,   fetched Monday, 24-Jan-2022 04:58:13 EST.

Free: Linux, Ubuntu operating-sys, OpenOffice office-suite, The GIMP ~photoshop, Firefox web-browser, FlashBlock flash on/off.