The background-color property sets the background color of a box. The color is painted beneath any background images, so it is visible only through their transparent parts (or when no images are set)..card {
background-color: #f0f0f0;
}.panel {
background-color: oklch(0.7 0.15 240 / 0.85);
}transparentFully transparent color (the initial value).currentColorUses the element's current color property value.rgb()RGB color function. Syntax: rgb(R G B [/ A]) or rgb(R, G, B[, A]).hsl()HSL color function — hue, saturation, lightness.hwb()HWB color function — hue, whiteness, blackness.lab()CIE Lab color function.lch()CIE LCH color function.oklab()Oklab color function.oklch()Oklch color function.color()Generic function for specifying color in custom color spaces.light-dark()Selects between two color values according to the document's color-scheme.CSS Backgrounds Module Level 4First Public Working Draft<color>W3CMDNCSSShow all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationvalue typessourcesvisual demonstrationpreviousnext