Fourth chapter value and unit of web security color

Source: Internet
Author: User

Objective

The fourth chapter mainly talk about the length of the Web page development units and the value of the color, the focus should focus on the difference between the EM and PX, but feel familiar with this knowledge point has been a long time, so let's not to comb, but this chapter refers to the Web security color a little to attract the eyeball, a long time ago saw this concept, has not So today it's a superficial research study!

I. What is WEB-safe color

The so-called "web-safe" color means that the color of dithering can always be avoided on a 256-color computer system.

A web-safe color can be expressed as a multiple of 20%, 51 of the RGB value (hexadecimal is represented as 33).

Using hexadecimal notation, ternary groups that use value 00,33,66,99,cc,ff are considered web-safe!

The concept is clear that when hexadecimal is used to represent a color, the color of any 3 elements in 00,33,66,99,CC,FF is web-safe, and when RGB is represented, it is converted to a corresponding 10 mechanism or a percentage relative to 255.

Two. Why Web-safe colors exist

Web security Color "security" and web security, free of malicious attacks and not a half-dime relationship, here the "security" word refers to a color on the page display of the effect is stable, consistent, basically not affected by the operating system or the client agent different, resulting in different effects!

Different platforms (Macs, PCs, etc.) have different color palettes, and different browsers have their own palettes. This means that for a picture, the image that appears in a Web browser on a Mac can vary greatly from the way it appears in the same browser on your PC.

When you select a specific color, the browser tries to use the closest color in the palette that you use. If the selected color is not available in the browser, it attempts to recreate the color by dithering or by blending its own color.

Web-safe colors are created to address the differences that occur when the same color is drawn on different platforms, colors that are made up of 00, 33, 66, 99, CC, and FF can be found in all browsers, so these colors can be "safely" applied to all Web applications. You don't have to worry about the color difference between different apps!

The WEB-safe color has 28-40 = 216 species (which can also be counted as 6*6*6), minus the 40, because the 40 colors appear differently in the Macintosh and Windows, so as the system retains color instead of being a safe color.

Here are 216 web-safe colors to look at: http://www.bootcss.com/p/websafecolors/

Three. Usage scenarios and necessary

The concept of web-safe color is good enough to address differences on different platforms, but it also seems to limit the total number of colors that developers can use. On the internet to find out what people think, support the use of web-safe color and think can be ignored by a lot of people.

The reasons that you think can be ignored are:

    • Most commonly used operating systems now display more than 256 colors, and do not need to be confined to the web-safe color range

The reasons that are considered necessary are:

    • Not all operating systems can display more than 256 colors.
    • Different displays in the color display also has the deviation, may also be different monitor color calibration not to do well, may also receive the viewing angle, the light environment influence and so on
    • Should avoid all the unsafe factors, to create more professional products

In the use of or see people see wisdom, or to consider the actual application scenario, after all, each enterprise on the product requirements and levels are not the same;

In my personal view, or prefer to use the web security color, or the existence of web security color is not necessary, after all, there are some non-mainstream minority, and try to follow the rules will reduce a lot of trouble! It is not too late to abandon those rules when there is little difference in the future!

Reference documents:

Http://www.cnblogs.com/cocowool/archive/2012/12/15/2819910.html

Http://baike.baidu.com/view/1529041.htm

Fourth chapter value and unit of web security color

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.