#1F0440#1F0440

#1F0440 is a very dark, moderate violet. Relative luminance 0.007; OKLCH L 20.9% C 0.103 H 296.9°. Best body text is #FFFFFF at 18.27:1 contrast (WCAG AA passes).

Color values

HEX#1F0440
RGBrgb(31, 4, 64)
HSLhsl(267, 88%, 13%)
HSVhsv(267, 94%, 25%)
CMYKcmyk(51.6%, 93.8%, 0%, 74.9%)
CIE-LABlab(6.76, 28.25, -31.96)
CIE-LCHlch(6.76, 42.66, 311.47°)
OKLaboklab(20.89% 0.0467 -0.092)
OKLCHoklch(20.89% 0.103 296.9)
XYZxyz(1.5337, 0.7483, 4.9131)
Luminance0.0075 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F0440 #254004
analogous
#040740 #1F0440 #3D0440
triadic
#1F0440 #401F04 #04401F
tetradic
#1F0440 #400407 #254004 #04403D
square
#1F0440 #400407 #254004 #04403D
split-complementary
#1F0440 #403D04 #074004
monochromatic
#0E021D #0E021D #1F0440 #3B087A #570BB3

Accessibility & contrast

On white

18.27
#1F0440 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.15
#1F0440 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F0440
18.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F0440#FFFFFF#000000##FFFFFF
##1F04401.0018.271.1518.27
#FFFFFF18.271.0021.001.00
#0000001.1521.001.0021.00
##FFFFFF18.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001542
Deuteranopia (green-blind)
#00143F
Tritanopia (blue-blind)
#161523
Achromatopsia (no color)
#151515

Design tokens & code

CSS
--color: #1f0440;
/* rgb */ color: rgb(31, 4, 64);
/* oklch */ color: oklch(20.9% 0.103 296.9);
Tailwind
colors: {
  custom: {
    50: '#5f4875',
    500: '#1f0440',
    950: '#000000',
  },
}
SCSS
$custom: #1f0440;
$custom-light: #5f4875;
$custom-dark: #000000;
JSON
{
  "hex": "#1f0440",
  "rgb": {
    "r": 31,
    "g": 4,
    "b": 64
  },
  "hsl": {
    "h": 267,
    "s": 88.235,
    "l": 13.333
  },
  "oklch": {
    "l": 0.20887,
    "c": 0.10315,
    "h": 296.9
  },
  "luminance": 0.00748
}

Semantic roles & 50–950 ramp

primary
#1F0440
secondary
#55811F
accent
#FE299F
background
#F5F4F7
surface
#EAE6ED
border
#C6C2C8
text
#050008
muted
#79777B

Preview Lab

Preview with #1F0440

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#1F0440 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva