#1F0840#1F0840

#1F0840 is a very dark, moderate violet. Relative luminance 0.008; OKLCH L 21.5% C 0.098 H 295.6°. Best body text is #FFFFFF at 17.99:1 contrast (WCAG AA passes).

Color values

HEX#1F0840
RGBrgb(31, 8, 64)
HSLhsl(265, 78%, 14%)
HSVhsv(265, 88%, 25%)
CMYKcmyk(51.6%, 87.5%, 0%, 74.9%)
CIE-LABlab(7.54, 26.05, -30.68)
CIE-LCHlch(7.54, 40.25, 310.33°)
OKLaboklab(21.47% 0.0422 -0.088)
OKLCHoklch(21.47% 0.098 295.6)
XYZxyz(1.5771, 0.8351, 4.9276)
Luminance0.0083 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F0840 #294008
analogous
#080D40 #1F0840 #3B0840
triadic
#1F0840 #401F08 #08401F
tetradic
#1F0840 #40080D #294008 #08403B
square
#1F0840 #40080D #294008 #08403B
split-complementary
#1F0840 #403B08 #0D4008
monochromatic
#0D031B #0D031B #1F0840 #390F76 #5416AD

Accessibility & contrast

On white

17.99
#1F0840 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.17
#1F0840 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F0840
17.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F0840#FFFFFF#000000##FFFFFF
##1F08401.0017.991.1717.99
#FFFFFF17.991.0021.001.00
#0000001.1721.001.0021.00
##FFFFFF17.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001742
Deuteranopia (green-blind)
#00163F
Tritanopia (blue-blind)
#161724
Achromatopsia (no color)
#171717

Design tokens & code

CSS
--color: #1f0840;
/* rgb */ color: rgb(31, 8, 64);
/* oklch */ color: oklch(21.5% 0.098 295.6);
Tailwind
colors: {
  custom: {
    50: '#5f4a75',
    500: '#1f0840',
    950: '#000000',
  },
}
SCSS
$custom: #1f0840;
$custom-light: #5f4a75;
$custom-dark: #000000;
JSON
{
  "hex": "#1f0840",
  "rgb": {
    "r": 31,
    "g": 8,
    "b": 64
  },
  "hsl": {
    "h": 264.643,
    "s": 77.778,
    "l": 14.118
  },
  "oklch": {
    "l": 0.21472,
    "c": 0.09756,
    "h": 295.6
  },
  "luminance": 0.00835
}

Semantic roles & 50–950 ramp

primary
#1F0840
secondary
#5A7E25
accent
#F434A5
background
#F5F4F7
surface
#EAE7ED
border
#C6C3C8
text
#050108
muted
#79777B

Preview Lab

Preview with #1F0840

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

Preview Lab → · Contrast checker → · Palette generator →

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