A few years back, the computer monitor screens could display only 256 colors. This was because of the hardware limits. Out of those 256 colors, the operating system itself used 40 colors, for menus etc. Thus only the remaining 216 colors could be used to create the web pages.
Another reason why 216 colors were selected was because it let the designers create 6 balanced and equally spaced color palettes using shades of red, green and blue, each from 00 to FF in hex with both extremes included.
The 256 colors for the older computer monitor screens were chosen by using a mathematical formula. These colors were obtained by taking 0%, 20%, 40%, 60%, 80% and 100% of the three primary colors, and then mixing these colors in every possible combination.
Check out the web safe colors chart, to see all the web safe colors with corresponding hexadecimal color codes.
Should You Always Use Web Safe Colors While Coding For The Web?
There is no need to worry about web safe colors now. This is because, at the time of writing, only 1% web users are on the old hardware, and this number is decreasing everyday. Most of the machines have enough bits these days making millions of colors available.
You can ignore the web safe colors even when developing websites for mobile phones. This is because most smartphones today are more much more powerful then the older machines and there is no limit on the colors you can use on them.
Thus you can safely use all the available colors and color schemes that you can generate by using the photoshop like online color picker tool and the color scheme generator tool.
Safest web colors? There is also a section of color palette that is known as the safest web colors. It was considered to be the best color palette to use by web designers as it guaranteed that the website developed using the safest web color palette will work on all available devices at that time. But, like web safe colors, the concept of safest web colors is also obsolete.