Home > Common Problem > Complete list of CSS color codes

Complete list of CSS color codes

zbt
Release: 2023-10-26 14:12:16
Original
3501 people have browsed it

CSS color codes include red (#FF0000), green (#00FF00), blue (#0000FF), black (#000000), white (#FFFFFF), yellow (#FFFF00), orange (# FFA500), purple (#FF00FF), pink (#FFC0CB), gray (#808080), brown (#5C3317), light green (#B0C4DE), etc.

Complete list of CSS color codes

CSS color codes are as follows:

Red(#FF0000)

Green(#00FF00)

Blue(#0000FF)

Black(#000000)

White(#FFFFFF)

Yellow(#FFFF00)

Orange(# FFA500)

Purple(#FF00FF)

Pink(#FFC0CB)

Gray(#808080)

Brown(#5C3317)

Light Green(#B0C4DE)

Light Blue(#87CEEB)

Light Red(#FFB6C1)

Light Yellow(#FFFF66)

In addition, CSS also supports the use of RGB, HSL and HEX color representations. RGB color representation uses three numerical values ​​(red, green, and blue) to represent colors, each ranging from 0 to 255. For example, red can be expressed as (255, 0, 0), green can be expressed as (0, 255, 0), and blue can be expressed as (0, 0, 255).

HSL color representation uses three numerical values ​​(hue, saturation, brightness) to represent color. Hue ranges from 0 to 360, and saturation and brightness range from 0 to 1. For example, red can be expressed as (0, 1, 0), green can be expressed as (120, 1, 0), and blue can be expressed as (240, 1, 0).

HEX color representation uses six hexadecimal numbers to represent colors. For example, red can be represented as (FF0000), green can be represented as (00FF00), and blue can be represented as (0000FF).

The above are some common CSS color codes. You can choose the appropriate representation according to your needs to set the background color, font color, etc. of the element.

The above is the detailed content of Complete list of CSS color codes. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template