Loading...
Loading...
00:00:00

Types of Colors In CSS

Create Your color According to your requirements Color Picker - https://panditprogrammer.github.io/Color-Picker/ 

In CSS3, there are three types of colors that can be specified:

  1. Named colors: These are the 140 standard color names, such as "red", "blue", "green", etc.

  2. RGB colors: These colors are specified using the RGB (Red Green Blue) model, where each color component is a value between 0 and 255. RGB colors are specified using the "rgb()" function, like this: rgb(255, 0, 0) for red.

    p{
        color: rgb(255, 0, 0); /* this is red color */
    }
  3. HEX colors: These colors are specified using a 6-digit hexadecimal code, like this: #FF0000 for red.

    p{
        color: #ffffff;    /* white color */
        color: #fff;  /* this is also valid syntax  */
        color: #ffffffe9;  /* white color with alpha value */
        color: #00ff00;  /* green color */
    }
  4. HSL colors: These colors are specified using the HSL (Hue, Saturation, Lightness) model, where hue is a value from 0 to 360 that represents a color on the color wheel, saturation is a value from 0% to 100% that specifies the purity of the color, and lightness is a value from 0% to 100% that specifies the brightness of the color. HSL colors are specified using the "hsl()" function, like this: hsl(0, 100%, 50%) for red.

In CSS3, you can also specify RGBA (Red, Green, Blue, Alpha) and HSLA (Hue, Saturation, Lightness, Alpha) colors, which are similar to RGB and HSL colors, respectively, but include an alpha channel that specifies the opacity of the color.

RGBA colors are specified using the "rgba()" function, like this: rgba(255, 0, 0, 0.5) for a transparent red. The fourth parameter, the alpha value, is a value from 0 to 1, where 0 is completely transparent and 1 is completely opaque.

p{
    color: rgba(200, 60, 102,0.6);
}

HSLA colors are specified using the "hsla()" function, like this: hsla(0, 100%, 50%, 0.5) for a transparent red. The fourth parameter, the alpha value, is also a value from 0 to 1.

By using RGBA or HSLA colors, you can specify colors with varying levels of opacity, which can be useful for creating more visually interesting designs.

CSS Color Name As Keyword

List of all css color name . All color name in css defined as keyword you can use directly. here is the list of 140 types of color's names.

black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua,
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood,
cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan,
darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkgrey, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue,
firebrick, floralwhite, forestgreen, fuchsia,
gainsboro, ghostwhite, gold, goldenrod, gray, green, greenyellow, grey,
honeydew, hotpink,
indianred, indigo, ivory,
khaki,
lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen,
magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin,
navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered, orchid,
palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple,
red, rosybrown, royalblue,
saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue,
tan, teal, thistle, tomato, turquoise,
violet,
wheat, white, whitesmoke,
yellow, yellowgreen