CSS named color

Crimson #DC143C

The CSS keyword crimson is #DC143C. It is a vivid red in the red family. In OKLCH it sits at lightness 0.571, chroma 0.222 and hue 20.1°.

Relative luminance
0.1604
OKLCH L · C · h
0.571 · 0.222 · 20.1
Best text
White 4.98:1
Hue family
Red

#DC143C color codes

HEX
#DC143C
RGB
rgb(220, 20, 60)
HSL
hsl(348, 83%, 47%)
OKLCH
oklch(0.571 0.222 20.1)
OKLab
oklab(0.571 0.208 0.076)
CIELAB (D65)
L* 47.04, a* 70.92, b* 33.60
XYZ (D65)
X 30.58, Y 16.05, Z 5.76
CMYK (naive)
cmyk(0%, 91%, 73%, 14%)

CIELAB and XYZ use the D65 white point; CSS lab() uses D50, so paste the OKLCH or HEX value into stylesheets. CMYK here is a plain formula with no press profile.

Legibility

Contrast: is #DC143C accessible?

White text on it reaches 4.98:1, passing AA. Black text manages only 4.20:1, enough for large text only.

WCAG 2 gives the same ratio whichever color is the text; APCA does not, so its Lc changes sign and size with polarity.

Open the Contrast System
  • Black text on it

    4.20:1

    • AA fails
    • AA large passes
    • AAA fails
    • APCA Lc +31
  • White text on it

    4.98:1

    • AA passes
    • AA large passes
    • AAA fails
    • APCA Lc −77
  • As text on black

    4.20:1

    • AA fails
    • AA large passes
    • AAA fails
    • APCA Lc −29
  • As text on white

    4.98:1

    • AA passes
    • AA large passes
    • AAA fails
    • APCA Lc +72

Nearest versions that pass 4.5:1

  • For text on white

    #DC143C 4.98:1

    It already reaches 4.98:1 on white, so no change is needed.

  • For text on black

    #E32142 4.56:1

    Lightening its OKLCH lightness from 0.57 to 0.59 reaches 4.56:1 on black, keeping the hue.

Checking another pair? Use the Contrast Checker.

Studio

Adjust #DC143C live

Move lightness, chroma and hue in OKLCH, or drag on the map. The map is every lightness and chroma at the current hue: sRGB inside the solid area, Display P3 out to the dashed line.

The studio needs JavaScript.

Scale

Shades and tints of #DC143C

Eleven OKLCH lightness steps at this hue, each with its contrast against white and black. #DC143C sits at step 600.

  1. 50#FFF1F1
    White
    1.09
    Black
    19.10
  2. 100#FFE4E3
    White
    1.20
    Black
    17.45
  3. 200#FFC8C6
    White
    1.46
    Black
    14.32
  4. 300#FF9F9F
    White
    1.96
    Black
    10.71
  5. 400#FF6970
    White
    2.79
    Black
    7.50
  6. 500#EE304A
    White
    4.07
    Black
    5.15
  7. 600This color#DC143C
    White
    4.98
    Black
    4.20
  8. 700#A70028
    White
    7.85
    Black
    2.67
  9. 800#7C001B
    White
    11.21
    Black
    1.87
  10. 900#53000F
    White
    15.27
    Black
    1.37
  11. 950#320006
    White
    18.44
    Black
    1.13

Under each step, white and black text on it; a bold figure passes 4.5:1.

Gamut

How vivid #DC143C can get

At its lightness and hue, sRGB reaches OKLCH chroma 0.230; #DC143C uses 97% of it. Display P3, which many recent phones and laptops show, reaches 0.259 there: 13% more.

0.00.20.40.60.80.20.40.60.8 460480500520540560580600620
  • sRGB
  • Display P3
  • Rec. 2020
  • Dominant wavelength
OKLCH chroma
0.222
sRGB edge
0.230
Display P3 edge
0.259
Rec. 2020 edge
0.302
Dominant wavelength
627 nm
Excitation purity
69%
Chromaticity
x 0.5838, y 0.3063
  • This color#DC143C
  • Most vivid in sRGB#DF0039
  • Most vivid in Display P3oklch(0.571 0.259 20.1)

On a screen without Display P3 the last tile shows the sRGB edge instead.

Use the wider color where screens show it
.accent {
  color: #dc143c;
}
@media (color-gamut: p3) {
  .accent { color: color(display-p3 0.8371 0 0.2138); }
}

Mixing

Mixing #DC143C

Each row is the same mix worked out in a different space, with the halfway color at its end. sRGB, which older CSS gradients use, can sag gray or dark in the middle; OKLab keeps the lightness steps even; OKLCH holds chroma and hue as it goes.

White #FFFFFF

  • sRGB50%#EE8A9E
  • OKLab50%#F89C9B
  • OKLCH50%#F89C9B

Black #000000

  • sRGB50%#6E0A1E
  • OKLab50%#540311
  • OKLCH50%#540311

Its complement #00888E

  • sRGB50%#6E4E65
  • OKLab50%#996968
  • OKLCH50%#7962CD
In CSS
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #dc143c, white);
color: color-mix(in oklch, #dc143c 50%, white);

In use

#DC143C in an interface

A button, a link, a heading, a focused field, an icon and a chart line in this color, on a light page and a dark one. Each check is a WCAG 2 contrast minimum: 1.4.3 for text, 1.4.11 for the rest.

Light page

  • Button labelText, 4.5:14.98:1 Passes
  • Link and body-size textText, 4.5:14.98:1 Passes
  • Large headingLarge text, 3:14.98:1 Passes
  • Icons, borders and focus ringsNon-text, 3:14.98:1 Passes

Dark page

  • Button labelText, 4.5:14.98:1 Passes
  • Link and body-size textText, 4.5:13.75:1 Fails
  • Large headingLarge text, 3:13.75:1 Passes
  • Icons, borders and focus ringsNon-text, 3:13.75:1 Passes

For text on this page, the nearest shade that passes is #ED2E49 4.53:1

Color vision

How #DC143C looks with color blindness

Deuteranopia changes it most, ΔE2000 44.1; tritanopia changes it least, 7.0.

Simulated with Machado et al. (2009) at full severity, in linear light.

Simulate a whole page What each type sees
  • Protanopia

    No working red (long-wavelength) cones

    #5C553B ΔE2000 36.3

    Distinct

    Reads as dark grayish brown

  • Deuteranopia

    No working green (medium-wavelength) cones

    #8B7E35 ΔE2000 44.1

    Distinct

    Reads as muted amber

  • Tritanopia

    No working blue (short-wavelength) cones

    #F20029 ΔE2000 7.0

    Noticeable

    Reads as vivid red

  • Achromatopsia

    No cone color vision; lightness only

    #6F6F6F ΔE2000 28.5

    Distinct

    Reads as gray

Pairing check

Checked against its complement, #00888E. Their lightness contrast is only 1.16:1, so where hue collapses, add a label, icon or pattern.

VisionThe pairΔE2000Verdict
Normal vision#DC143C · #00888E56.5Stays distinct
Protanopia#5C553B · #7D818F26.3Stays distinct
Deuteranopia#8B7E35 · #6C758F35.7Stays distinct
Tritanopia#F20029 · #008E8A60.0Stays distinct
Achromatopsia#6F6F6F · #7A7A7A4.4Easily confused

Harmony

Color harmonies for #DC143C

Its complement is #00888E, a muted cyan, on the cool side of the wheel.

Hue rotations in OKLCH, mapped into sRGB by trimming chroma so hue and lightness stay put.

Open the Harmony Studio
  • Base#DC143C
  • Complement#00888E

Complementary

Open in Harmony Studio
  • −30°#CE1F89
  • Base#DC143C
  • +30°#BB5700
  • Base#DC143C
  • +120°#299000
  • +240°#126DF7
  • Base#DC143C
  • +150°#008D6E
  • +210°#0083AE

Split-complementary

Open in Harmony Studio

Code

Design tokens

Ready-to-paste tokens in six formats. Rename them to fit your system.

CSS custom property

:root {
  --color-crimson: #dc143c;
}

Tailwind config

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        crimson: '#dc143c',
      },
    },
  },
};

Tailwind v4 theme

/* app.css — Tailwind CSS v4 */
@import "tailwindcss";

@theme {
  --color-crimson: oklch(0.571 0.222 20.1);
}

Design token (W3C DTCG)

{
  "color": {
    "crimson": {
      "$type": "color",
      "$value": {
        "colorSpace": "srgb",
        "components": [0.8627, 0.0784, 0.2353],
        "hex": "#dc143c"
      },
      "$description": "CSS named color crimson"
    }
  }
}

SwiftUI color

import SwiftUI

enum Palette {
    static let crimson = Color(.sRGB, red: 0.863, green: 0.078, blue: 0.235, opacity: 1)
}

Jetpack Compose color

import androidx.compose.ui.graphics.Color

object Palette {
    val Crimson = Color(0xFFDC143C)
}

Matches

The nearest match in each system

The closest CSS name, Tailwind shade, RAL Classic paint and Crayola crayon by ΔE2000; under 2 is hard to tell apart side by side. RAL and Crayola values approximate physical colors.

Tools

Open #DC143C in the tools

Each opens over this page. More colors live in the Color Library, and every color page is listed on the hub.