

Web safe colors used to be really important when 8-bit was the standard color setting for most users. Where a is the level of red, b the level green and c the level blue (must all be a number between 0 and 255).ĭ is the transparency of the color, and it must be a value between 0 and 1 (ex : 0.7).īelow is a table showing the 216 web safe colors. If you want valid HTML or CSS, use the HEX values instead.ĬSS3 introduced the possibility to use RGBA (RGB with Alpha) colors.

I discuss this in a separate article.Īs a color system for web design and development, hexadecimal has both strengths and weaknesses: The latest specification for CSS color allows hexidecimal colors to include an an alpha or opacity component, added as #RRGGBBAA or #RGBA. It’s important to understand that hexadecimal allows access to the same gamut as the two other primary CSS color systems (RGB and HSL) the color variety is not greater or less in hex. The hexadecimal values do not have to be the same for each pair: #3fa027 is a perfectly valid hex color, but can’t be shortcut. Shortcutting hexadecimal values has one potential weak point: accidentally typing in four digits, rather than three, will invoke the alpha component for hex colors in supporting browsers. For example, black becomes #000, pure red #f00, etc. If you happen to use a web safe color, it does have one advantage - all web safe colors provide the option to shortcut the hexidecimal code. These colors used to be particularly relevant when screen displays had a very limited color range they’re not common or necessary now. “Web safe” colors are created when the number in each color pair is the same ( 00, 77, ee, etc). Taken further, you can think of each flashlight with a dimmer switch - from 00 to ff, so #777777 would be a mid-level grey, and #440000 would be a dark red. Turning on the red and green flashlights and converging their beams ( #ffff00) will make the room appear yellow. Used in a dark room, turning on only the red flashlight ( #ff0000) will make everything appear to be red.
#Css color codes for white full
In hex, 00 means “off”, and ff means “flashlight full on”. the default color of your screen).Ī simple mnemonic to remember base-16 for color is to think of each color component (red, green and blue) as a seperate flashlight with an appropriate filter on it. Note that CSS hexadecimal color is an additive color system where no input means black (i.e. So #000000 would represent black - no input from red, green or blue - while white would be #ffffff, and #ffff00 yellow. The complete hexadecimal color is preceeded by a # symbol. The higher the value for a component, the more “strength” or “input” it has in the final color - 00 represents no input of a color component, and ff represents a total commitment of a component. At that point, the last digit starts ticking upwards again. At that point, the first digit rolls over like an odometer, and the last one resets, becoming 10. After 09, the number pair moves to 0a, then 0b, until it gets to 0f. One step higher would be 01, followed by 02, etc. Used in pairs this way, the lowest value of a color component would be 00. In the most common variant, hex color components - red, green and blue - are represented by two pairs of digits each. This page shows lighter and darker color variations of white smoke, and you can find more similar colors within the white color codes category.

#Css color codes for white code
Unlike our familiar base-10 system, with integers from 0 to 9, the hexadecimal system has 16 digits: 0 to 9, followed by a to f. The white smoke color is a shade of white and has a hex code value of f5f5f5, has a rgb value of rgb(245,245,245), and has whitesmoke as its css name. The key to learning hex is understanding the hexadecimal counting system. Standard CSS color keywords are limited to 149 named shades the hexadecimal (or “hex”) color method has access to the full RGB gamut.
