Color coding in full CSS


In the previous CSS lesson, Taimienphi.vn introduced you to the syntax in CSS as well as instructions on how to embed and insert CSS into HTML documents. In the next article below, Taimienphi.vn will introduce you more about color codes and colors in CSS.


Color in CSS Used to set the color of the object of an element or as a background color, …. Refer to the following article of Taimienphi.vn to learn CSS and understand about colors in CSS.

CSS color, background color, transparency, text

Color coding in the most complete CSS

CSS uses color values ​​to specify the display color. Often these colors are used to set the color of objects of an element (such as text, …) or to use as background colors, borders, etc.

We can specify different color values. The following table lists all color formats in CSS:

mau in css

Format Syntax Example

Hex Code #RRGGBB p {color: # FF0000;}

Short Hex Code #RGB p {color: # 6A7;}

RGB% rgb (rrr%, ggg%, bbb%) p {color: rgb (50%, 50%, 50%);}

RGB color model rgb (rrr, ggg, bbb) p {color: rgb (0,0,255);}

Name of aqua, black, … p {color: teal;}

Hex code format in CSS

Hex (hex code) stands for Hexadecimal. We can roughly understand, a Hex value consisting of 6 letters trying to represent a color value. Where the first 2 digits (RR) represent the value of Red, the next 2 digits (GG) represent Green and the last 2 digits (BB) are Blue.

Hex values ​​can be obtained on any graphics software such as Adobe Photoshop, Jasc Paintshop Pro, even Advanced Paint Brush.

Symbol “#“is placed before each Hex Code value.

Quickly in CSS 2

Short Hex Code format in CSS

Short Hex Code is a shortened form of Hex Code. In this format, the pairs of digits will be reduced to a corresponding number. For example, the value # 66AA77 is equivalent to the value # 6A7 in Short Hex Code.

Hex values ​​(hex codes) can be obtained on any graphics software such as Adobe Photoshop, Jasc Paintshop Pro, even Advanced Paint Brush.

Symbol “#“is placed before each Hex Code value.

Quickly in CSS 3

RBG value in CSS

Color values ​​are specified through the use of attributes rgb (). This property takes 3 values, one for RED, one for Green and one for Blue. Values ​​can be whole numbers from 0 to 255 or as a percentage (%).

Note: All browsers do not support the attribute rgb (). Therefore, betdownload.com recommends that you do not use this property.

Quickly in CSS 4

Generate color codes

By using the HTML Color Code Builder we can create millions of different color codes. However to use this tool we will have to enable Java browser.

List of colors for the browser

The table below includes a list of 216 different color codes thought to be “suitable” for web browsers and guaranteed to display correctly on computers.

Quickly in CSS 5

Quickly in CSS 6

Quickly in CSS 7

The above article Taimienphi.vn has just introduced you to color code in CSS. In the next CSS lesson, Taimienphi.vn will introduce you further CSS background properties Please.

https://thuthuat.taimienphi.vn/mau-trong-css-48839n.aspx
In addition, if you have any questions or questions, you can leave your comments in the comment section below the article.

.

Add a Comment

Your email address will not be published. Required fields are marked *