PHP Classes

HTML Color Matrix: Determine the closest browser safe color value

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 32%Total: 572 All time: 5,338 This week: 198Up
Version License Categories
colormatrixhtml 1.0GNU General Publi...Graphics
Description Author

You may have heard of the browser safe palette, Netscape palette, 216 palette, Web palette, or 6x6x6 color cube. All these terms refer to the same set of colors that usually are guaranteed to be available for displaying in Web pages in a browser screen using 256 colors without color remapping.

If you are concerned that your Web design work will be viewed in a 256 color (8-bit) screen, you may use the methods provided by this class to convert your color values to the closest color tones in the 216 color browser safe palette.

This class accepts hexadecimal color values or RGB values.

Picture of tobozo
  Performance   Level  
Name: tobozo <contact>
Classes: 3 packages by
Country: France France
Age: ???
All time rank: 172550 in France France
Week rank: 260 Up12 in France France Up

  Files folder image Files  
File Role Description
Plain text file colorMatrixHTML.class Class Class for converting color values to html browser-safe values
Accessible without login Plain text file example.php Example Example code
Accessible without login Plain text file showColorMatrix.php Example Code Sample to display 216 colors as html

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,338
This week:198Up
 User Ratings  
 All time