We are often told to only use web-safe colors for font's and background colors etc when not using an image. I don't understand why this is? Most websites contain high quality jpegs these days with minimum 16-bit color so why are we being restricted only to web-safe colors of which there are only 256?

  • 9
    Who/What is still (often) telling you to use web-safe colors? What is actually restricting you? I've not seen recommendations to use web-safe colors for probably years now! Commented Aug 31, 2011 at 7:16
  • Yeah, normally I don't think about it, however today it just occured to me that if people aren't worried about pictures on websites not rendering in the color they want then why do they care about borders, font colors and background fills. However still, when something has to be styled using a style sheet, we are told to stick with web-safe colors. It beats me as to why.
    – Ali
    Commented Aug 31, 2011 at 7:23
  • 1
    @Ali Beats me too :)
    – jensgram
    Commented Aug 31, 2011 at 8:00
  • 2
    I would bet your clients have simply heard the term and assume the alternative to "web safe" fonts must somehow not be safe on the web. Old buzzwords die hard once they get into users heads.
    – Ben Brocka
    Commented Aug 31, 2011 at 14:07
  • 2
    "We are often told to only use web-safe colors" = sounds like you fell into a time machine and went back a decade. ;)
    – DA01
    Commented Aug 31, 2011 at 15:15

7 Answers 7


It sounds like an out-of-date concept. I think there were problems when the colours could not be rendered, because they were sometimes shown as speckled - a combination of colours, that appear correct in large swathes, but would not work at all for narrower items like borders.

Unless you are explicitly designing for very old computers, then I would not consider this to be a valid restriction these days. If someone is telling you to use these, then ask them why - they may not know either.

  • 3
    "Dithering" is the term. Commented Sep 1, 2011 at 2:27
  • It is not what I understand by dithering, but you are probably right. Commented Sep 1, 2011 at 13:12

The main issue with colours now is to ensure they are Accessible. Web-Safe colours were more releated to hardware compatibility (monitors and such like) whereas now we are more concerned that the colours pass the required W3C Accessibility guidelines.

  • 1
    Yes, this. It's hard enough to come up with an accessible palette that looks fairly decent without the added burden of "web safe". Contrast is more important. Also, I'd suggest creating a custom palette at paletton.com with the simulation for "deuteranopia" turned on. (If that's too daunting, "deuteranomaly" should work for most of them.) Colour Contrast Analyser is a great free tool as well. Consider just using shades of blue, yellow, green, magenta, and gray. (If you must use red, keep it orangish or pinkish and check it with the protanope sim.)
    – Jon Coombs
    Commented Nov 6, 2015 at 4:44

Unless you're still reading w3schools, I don't think you're going to come across advice to use "web safe" colors much anymore.

When it was first given, browsers couldn't support the entire spectrum of colors available in a 6-digit RGB string. Now-a-days, ~100% of users support the whole RGB spectrum.

Some advice that is still relevant is to check your color accessibility. Make sure you've got enough contrast, and that you're not using colors that blend together for colorblind users. You'd be surprised how common colorblindness is, and many colorblind people don't see in greyscale, they just can't differentiate some colors.


as Schroedingers Cat said.. it is a very old concept related to visualisation issues on old hardware, if you don't have W3C as a requirement than consider this.

How will the brand and the user experience benefit from a wider range of colours? How much will if benefit from the W3C compliance?


One of the advocates of "Web-safe colours" many years ago was visibone.com. The idea was that when running on an 8-bit display, only 216 colours were actually available for the browser to assign as it saw fit. The 216 "web-safe" colours were thus chosen.

Unfortunately, there are several problems with sticking to this colour palette. The first was that whilst on Windows or Mac in 8-bit mode the browser can setup all 216 colours, in a limited-colour X Windows environment, it might have access to a smaller palette, which wrecks the 216 colour palette. The second problem is that most PCs run in 16-bit or 24-bit colour now and such a limited palette is pointless.

The last problem is that there are many colours that are not in the web-safe palette. It still provides a good starting point, but don't be bound by it.

  • There were generally more than 216 colors available; in Windows I believe there were 236. On the other hand, a color scheme in which can use any combination of six red, six green, and six blue values is easier to work with than one where the available set of red values depends upon the green and blue values, etc. Some platforms use different numbers of red, green, and blue values but that often makes things that should be gray often turn out off-gray.
    – supercat
    Commented Feb 26, 2014 at 16:57

Basically, Web-safe color are depends on the hardware component (like monitor). Many computer screens back then had 8-bit color displays, which could only display 256 different colors. The computer system itself uses some 40 colors, for menus and such, and the remaining 216 colors could be used to display the actual web pages.

Now, 216 colors might sound like quite a bit, but the problem is that no aesthetic considerations were made when these colors were decided, but rather they are based solely on mathematical formulas. To be more exact, the web-safe colors are what you get when you use 0%, 20%, 40%, 60%, 80% and 100% of the three different primary colors, and then mix these in every possible combination.

more details here: http://www.colorsontheweb.com/websafecolors.asp

RGB codes for web-safe colors are made up of the digit zero plus the other hex digits that are multiples of three: 3, 6, 9, C (12), and F (15). Additionally, the digits are always used in equal pairs.


See also list of web-safe colors: http://www.pawprint.net/designresources/web-colours.php

  • 1
    Windows used 20 colors for system purposes; I think the Macintosh used about that many. I think Netscape decided to use 216 colors because it's 6x6x6, which yields six proper grays. Some other combinations combinations (e.g. 6x9x4) might have yielded better looking color photographs due to the eye's higher sensitivity to green and lower sensitivity to red, but wouldn't be able to show any "gray" tones that weren't tinged with color.
    – supercat
    Commented Feb 26, 2014 at 17:01

On the other hand I still can appreciate conventions sticking to a reduced color palette if they do not unnecessarily dampen the user experience or complicate development, that is.

Coming from a unit testing perspective, I launch Xvfb servers in 8-bit depth to conserve resources predominantly, and within those perform a plethora of web automation tests. My scripts take screenshots at critical steps or liberally for debugging. I try to save as optimized 8bit PNGs, but even in true color a lot of websites and web apps turn out looking pretty bad, or simply unreadable to the eye.

Not necessarily on the Linux/Xserver paradigm but also my Selenium grid uses Windows XP/Vista/7 hosts. Often not using the actual user's screen, but launches (and destroys) remote terminal sessions reduced to 256 colors, or virtual machines of those OSes.

  • 1
    but then that's not as much about User Experience as about Tester Experience I suppose
    – Marcos
    Commented Mar 10, 2012 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.