The color property sets the element's primary foreground color — mainly the text fill color. Its value is also what currentColor resolves to for other properties. Inherited from parent.p {
color: navy;
}:root {
color: light-dark(oklch(0.2 0.05 240), oklch(0.95 0.02 240));
}currentColorCurrent color value (self-referential — equivalent to inherit).transparentFully transparent color.CanvasTextSystem color — default text on Canvas (initial value of color).CanvasSystem color — primary content background.LinkTextSystem color — unvisited link text.VisitedTextSystem color — visited link text.ActiveTextSystem color — currently active link.rgb()RGB color function.hsl()HSL color function.hwb()HWB color function.lab()CIE Lab color function.lch()CIE LCH color function.oklab()Oklab color function.oklch()Oklch color function.color()Generic color function for custom color spaces.color-mix()Mixes two colors in a given color space.light-dark()Selects between two color values per color-scheme.CSS Color Module Level 4Editor's 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