1. Computing & Technology

Discuss in my forum

PHP Hex Color Chart

By , About.com Guide

1 of 3

Understanding Hex Colors
PHP Hex Color Chart
Before we can generate a chart of colors we must first understand the basics of how colors work on the web. Anyone who's done a little web design knows that #000000 is black and #ffffff is white and the colors in between are created in this six digit fashion. What you may not fully understand is what these letters and numbers mean.

The first two digits of the number represent the red value of the color, the next two represent the green value, and the final two represent the blue value. All of the colors on our computer are represented using different combinations of these values.

So what's with the letters? Although as humans we usually work in a base 10 system of counting, when dealing with colors we work in a base 16 system. That means that 0-9 are represented the same, however 10-15 are represented as A-F before adding a second digit to a number.

©2012 About.com. All rights reserved.

A part of The New York Times Company.