Skip to content

CSS named color

Crimson #DC143C

Crimson (CSS keyword crimson) has the hex code #DC143C and the RGB value rgb(220, 20, 60): a medium-dark, vivid red.

Crimson#DC143C

The word crimson comes from the kermes insect dye (via Arabic qirmiz). The CSS value is a deep, slightly pinkish red that is darker and cooler than red, often used for error states.

Color codes for Crimson

Color codes for Crimson
CSS keywordcrimson
HEX#DC143C
RGBrgb(220, 20, 60)
HSLhsl(348, 83%, 47%)
HWBhwb(348 8% 14%)
OKLCHoklch(57.1% 0.222 20.1)
CMYK (naive, no ICC profile)cmyk(0%, 91%, 73%, 14%)
Decimal14,423,100
Hue familyReds

Contrast and accessibility

On crimson, white text has a contrast ratio of 4.98:1 and passes AA for normal text; black text reaches 4.20:1.

WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on crimson4.20:1FailPassFailFail31.9
White text on crimson4.98:1PassPassFailPass−77.6
Crimson text on white4.98:1PassPassFailPass72.2
Crimson text on black4.20:1FailPassFailFail−29.5

Tints and shades

Each step mixes crimson with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, crimson, white 25%) in CSS.

Tints (mixed with white)

  1. 5%
    #de2046
  2. 15%
    #e13759
  3. 25%
    #e54f6d
  4. 35%
    #e86680
  5. 45%
    #ec7e94
  6. 55%
    #ef95a7
  7. 65%
    #f3adbb
  8. 75%
    #f6c4ce
  9. 85%
    #fadce2
  10. 95%
    #fdf3f5

Shades (mixed with black)

  1. 5%
    #d11339
  2. 15%
    #bb1133
  3. 25%
    #a50f2d
  4. 35%
    #8f0d27
  5. 45%
    #790b21
  6. 55%
    #63091b
  7. 65%
    #4d0715
  8. 75%
    #37050f
  9. 85%
    #210309
  10. 95%
    #0b0103

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, crimson's complementary color is #008B93 (close to darkcyan), its analogous colors are #CE1F89 and #C44E00, and its triadic partners are #009300 and #126DF7. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#008b93
Analogous−30°, +30°#ce1f89#c44e00
Triadic+120°, +240°#009300#126df7
Split-complementary+150°, +210°#00906b#0084b8

Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.

Warm or cool?

Crimson is a warm color: its hue is 348° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.

Nearest named and Tailwind colors

Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
red#ff00007.7
firebrick#b222228.9
indianred#cd5c5c9.0

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
rose-600#ec003f3.6
red-600#e7000b3.8
rose-700#c700365.8

Code snippets

CSS
.element {
  color: crimson;
  background-color: #dc143c;
  border-color: rgb(220 20 60);
  outline-color: oklch(57.1% 0.222 20.1);
}
Tailwind CSS
<div class="bg-[#dc143c] text-white">...</div>

/* or register it once in your CSS (Tailwind v4) */
@theme {
  --color-crimson: #dc143c;
}
/* then use bg-crimson, text-crimson, border-crimson */
SwiftUI
import SwiftUI

extension Color {
  static let crimson = Color(red: 0.863, green: 0.078, blue: 0.235)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Crimson = Color(0xFFDC143C)
Flutter
import 'package:flutter/material.dart';

const crimson = Color(0xFFDC143C);
Android XML
<!-- res/values/colors.xml -->
<color name="crimson">#DC143C</color>

Frequently asked questions

What is the hex code for crimson?
The hex code for crimson is #DC143C. The same color is rgb(220, 20, 60), hsl(348, 83%, 47%) and oklch(57.1% 0.222 20.1), and in CSS you can also write the keyword crimson directly.
Is crimson a warm or cool color?
Crimson is a warm color: its hue is 348° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.
What colors go with crimson?
Rotating the hue in OKLCH while keeping lightness and chroma, crimson's complementary color is #008B93 (close to darkcyan), its analogous colors are #CE1F89 and #C44E00, and its triadic partners are #009300 and #126DF7. For text on top, white gives the higher contrast.
Can you use white text on crimson?
White text on crimson has a contrast ratio of 4.98:1, which passes AA for normal text but not AAA under WCAG 2.2. Black text reaches 4.20:1 and passes AA only for large text (24 px, or 18.66 px bold, and up). In APCA terms that is Lc −77.6 for white and Lc 31.9 for black.
What is the RGB value of crimson?
Crimson is rgb(220, 20, 60): red 220, green 20 and blue 60 on the 0 to 255 scale, or 86.3%, 7.8% and 23.5%. As a decimal integer it is 14423100.

Last reviewed by Arielton Oberek.