#1F0540#1F0540

#1F0540 is a very dark, moderate violet. Relative luminance 0.008; OKLCH L 21.0% C 0.102 H 296.6°. Best body text is #FFFFFF at 18.20:1 contrast (WCAG AA passes).

Color values

HEX#1F0540
RGBrgb(31, 5, 64)
HSLhsl(266, 86%, 14%)
HSVhsv(266, 92%, 25%)
CMYKcmyk(51.6%, 92.2%, 0%, 74.9%)
CIE-LABlab(6.96, 27.70, -31.64)
CIE-LCHlch(6.96, 42.05, 311.20°)
OKLaboklab(21.04% 0.0455 -0.091)
OKLCHoklch(21.04% 0.102 296.6)
XYZxyz(1.5445, 0.7700, 4.9167)
Luminance0.0077 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F0540 #264005
analogous
#050840 #1F0540 #3C0540
triadic
#1F0540 #401F05 #05401F
tetradic
#1F0540 #400508 #264005 #05403C
square
#1F0540 #400508 #264005 #05403C
split-complementary
#1F0540 #403C05 #084005
monochromatic
#0E021C #0E021C #1F0540 #3A0979 #560EB2

Accessibility & contrast

On white

18.20
#1F0540 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #1F0540
18.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F0540#FFFFFF#000000##FFFFFF
##1F05401.0018.201.1518.20
#FFFFFF18.201.0021.001.00
#0000001.1521.001.0021.00
##FFFFFF18.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001642
Deuteranopia (green-blind)
#00153F
Tritanopia (blue-blind)
#161623
Achromatopsia (no color)
#151515

Design tokens & code

CSS
--color: #1f0540;
/* rgb */ color: rgb(31, 5, 64);
/* oklch */ color: oklch(21.0% 0.102 296.6);
Tailwind
colors: {
  custom: {
    50: '#5f4875',
    500: '#1f0540',
    950: '#000000',
  },
}
SCSS
$custom: #1f0540;
$custom-light: #5f4875;
$custom-dark: #000000;
JSON
{
  "hex": "#1f0540",
  "rgb": {
    "r": 31,
    "g": 5,
    "b": 64
  },
  "hsl": {
    "h": 266.441,
    "s": 85.507,
    "l": 13.529
  },
  "oklch": {
    "l": 0.21036,
    "c": 0.10171,
    "h": 296.6
  },
  "luminance": 0.0077
}

Semantic roles & 50–950 ramp

primary
#1F0540
secondary
#568120
accent
#FC2CA0
background
#F5F4F7
surface
#EAE7ED
border
#C6C3C8
text
#050108
muted
#79777B

Preview Lab

Preview with #1F0540

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

Preview Lab → · Contrast checker → · Palette generator →

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