CSS Colors

CSS Colors: In CSS, you can use color values to specify a color i.e., these can be used to provide color either at the foreground of an element which is text or for the background of the element. These can also use to color the borders and decoration effects. Color values in CSS can specify in multiple formats.

CSS Colors Formats

Here the list of formats

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 Absolute rgb(rrr,ggg,bbb) p{color:rgb(0,0,255);}
keyword aqua, black, etc. p{color:teal;}

CSS Colors in Hex Codes

The Hexadecimal is a six-digit representation of the color. The Red color specified by the first two digits value which is “RR”, the green color occupies its place as the next two-digit value which is “GG” and remaining are blue color whose value is “BB”. These hexadecimal values can be derived from any graphics software like Jasc Paintshop Pro, Adobe Photoshop and also advanced paintbrush. Every hexadecimal code is represented by a hash sign(#) or pound.

css color HEX

CSS Colors in Short Hex Codes

Hexadecimal codes can be described in the shortest form. For example: #9A6 which is #99AA66. Every hexadecimal code is represented by the pound or hash sign(#). Some color short form is described below.CSS Colors HEX short notation

CSS Colors with RGB Values

In this, the color value is specified with the help of rgb( ) property. This property contains three values which are red, green, and blue. This value can be an integer between 0 and 255 or a percentage(%).

NOTE − All the browsers may not support rgb() property so it is not recommended use.

Here some examples of colors using RGB values.

CSS RGB Colors

Creating your Own Color Code

You can create the number of color codes using Color Code Builder. Verify the HTML Color code Builder for that you need java to enable browser.

Web Browser Safe Colors

List of the web browser which is safe and independent colors. These are of 216 variety of colors ranges from 00000 to FFFFF. These colors are safe because they run correctly 256 color palette.

CSS Web browser Colors