Skip to content

CSS named color

DarkRed #8B0000

DarkRed (CSS keyword darkred) has the hex code #8B0000 and the RGB value rgb(139, 0, 0): a dark, vivid red.

DarkRed#8B0000

Dark red (#8b0000) is the X11 dark variant of red, slightly brighter than maroon (#800000). It has enough contrast with white for body text.

Color codes for DarkRed

Color codes for DarkRed
CSS keyworddarkred
HEX#8B0000
RGBrgb(139, 0, 0)
HSLhsl(0, 100%, 27%)
HWBhwb(0 0% 45%)
OKLCHoklch(40% 0.164 29.2)
CMYK (naive, no ICC profile)cmyk(0%, 100%, 100%, 45%)
Decimal9,109,504
Hue familyReds

Contrast and accessibility

On darkred, white text has a contrast ratio of 10.01:1 and passes AAA at any text size; black text reaches 2.09: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 darkred2.09:1FailFailFailFail13.2
White text on darkred10.01:1PassPassPassPass−95.1
Darkred text on white10.01:1PassPassPassPass90.7
Darkred text on black2.09:1FailFailFailFail−11.6

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #910d0d
  2. 15%
    #9c2626
  3. 25%
    #a84040
  4. 35%
    #b45959
  5. 45%
    #bf7373
  6. 55%
    #cb8c8c
  7. 65%
    #d6a6a6
  8. 75%
    #e2bfbf
  9. 85%
    #eed9d9
  10. 95%
    #f9f2f2

Shades (mixed with black)

  1. 5%
    #840000
  2. 15%
    #760000
  3. 25%
    #680000
  4. 35%
    #5a0000
  5. 45%
    #4c0000
  6. 55%
    #3f0000
  7. 65%
    #310000
  8. 75%
    #230000
  9. 85%
    #150000
  10. 95%
    #070000

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, darkred's complementary color is #005461 (close to darkslategray), its analogous colors are #850045 and #733300, and its triadic partners are #005B11 and #27399E. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#005461
Analogous−30°, +30°#850045#733300
Triadic+120°, +240°#005b11#27399e
Split-complementary+150°, +210°#005749#004d7f

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?

DarkRed is a warm color: its hue is 0° 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
maroon#8000002.5
brown#a52a2a8.2
firebrick#b222229.8

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
red-900#82181a2.5
red-800#9f07124.7
orange-900#7e2a0c4.7

Code snippets

CSS
.element {
  color: darkred;
  background-color: #8b0000;
  border-color: rgb(139 0 0);
  outline-color: oklch(40% 0.164 29.2);
}
Tailwind CSS
<div class="bg-[#8b0000] text-white">...</div>

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

extension Color {
  static let darkred = Color(red: 0.545, green: 0.000, blue: 0.000)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const darkred = Color(0xFF8B0000);
Android XML
<!-- res/values/colors.xml -->
<color name="darkred">#8B0000</color>

Frequently asked questions

What is the hex code for darkred?
The hex code for darkred is #8B0000. The same color is rgb(139, 0, 0), hsl(0, 100%, 27%) and oklch(40% 0.164 29.2), and in CSS you can also write the keyword darkred directly.
Is darkred a warm or cool color?
DarkRed is a warm color: its hue is 0° 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 darkred?
Rotating the hue in OKLCH while keeping lightness and chroma, darkred's complementary color is #005461 (close to darkslategray), its analogous colors are #850045 and #733300, and its triadic partners are #005B11 and #27399E. For text on top, white gives the higher contrast.
Can you use white text on darkred?
White text on darkred has a contrast ratio of 10.01:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 2.09:1 and fails AA even for large text. In APCA terms that is Lc −95.1 for white and Lc 13.2 for black.
What is the RGB value of darkred?
DarkRed is rgb(139, 0, 0): red 139, green 0 and blue 0 on the 0 to 255 scale, or 54.5%, 0.0% and 0.0%. As a decimal integer it is 9109504.

Last reviewed by Arielton Oberek.