MyInternships.in

CSS References

CSS Colors Reference

CSS lets you specify colour in several formats — from friendly keyword names to hex codes, RGB and HSL, and modern perceptual spaces. This reference explains each format and then lists the most popular named colours with their hex equivalents so you can pick and copy quickly.


Colour formats

FormatExampleDescription
NamedtealOne of ~148 predefined keyword colours.
Hex#0f766eRed, green, blue in hexadecimal.
Hex + alpha#0f766e808-digit hex including opacity.
Short hex#0bc3-digit shorthand (expands to #00bbcc).
rgb()rgb(15 118 110)Red, green, blue as 0–255 or percentages.
rgba()rgba(15,118,110,0.5)RGB plus an alpha channel (0–1).
hsl()hsl(174 66% 40%)Hue, saturation, lightness — intuitive to tweak.
hsla()hsla(174,66%,40%,0.5)HSL plus alpha.
hwb()hwb(174 6% 54%)Hue, whiteness, blackness.
oklch()oklch(56% 0.1 174)Perceptually uniform modern colour.
currentColorcurrentColorKeyword equal to the element's color value.
transparenttransparentFully transparent black (rgba(0,0,0,0)).
💡

HSL is the easiest format for building palettes: keep hue and saturation fixed and vary lightness to make tints and shades of the same colour.

Popular named colours

NameHexFamily
black#000000Neutral
white#ffffffNeutral
gray#808080Neutral
silver#c0c0c0Neutral
red#ff0000Red
crimson#dc143cRed
maroon#800000Red
tomato#ff6347Red/Orange
orange#ffa500Orange
gold#ffd700Yellow
yellow#ffff00Yellow
khaki#f0e68cYellow
green#008000Green
lime#00ff00Green
olive#808000Green
seagreen#2e8b57Green
teal#008080Cyan
cyan / aqua#00ffffCyan
turquoise#40e0d0Cyan
blue#0000ffBlue
navy#000080Blue
royalblue#4169e1Blue
steelblue#4682b4Blue
dodgerblue#1e90ffBlue
indigo#4b0082Purple
purple#800080Purple
violet#ee82eePurple
magenta / fuchsia#ff00ffPink
pink#ffc0cbPink
hotpink#ff69b4Pink
brown#a52a2aBrown
chocolate#d2691eBrown
coral#ff7f50Orange
salmon#fa8072Red/Pink
ℹ️

See the Color Values page for a deeper look at alpha/opacity and a runnable swatch example you can edit.

Related CSS Topics

Keep learning with these closely related tutorials.

Ready to use your CSS skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships