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?

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!
–
Roger AttrillAug 31 '11 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.
–
AliAug 31 '11 at 7:23

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♦Aug 31 '11 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. ;)
–
DA01Aug 31 '11 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.

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.

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.

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.
–
supercatFeb 26 '14 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.

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.
–
supercatFeb 26 '14 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.