#1F0340#1F0340

#1F0340 is a very dark, moderate violet. Relative luminance 0.007; OKLCH L 20.7% C 0.105 H 297.2°. Best body text is #FFFFFF at 18.33:1 contrast (WCAG AA passes).

Color values

HEX#1F0340
RGBrgb(31, 3, 64)
HSLhsl(268, 91%, 13%)
HSVhsv(268, 95%, 25%)
CMYKcmyk(51.6%, 95.3%, 0%, 74.9%)
CIE-LABlab(6.56, 28.79, -32.28)
CIE-LCHlch(6.56, 43.26, 311.73°)
OKLaboklab(20.74% 0.0479 -0.093)
OKLCHoklch(20.74% 0.105 297.2)
XYZxyz(1.5228, 0.7266, 4.9095)
Luminance0.0073 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F0340 #244003
analogous
#030540 #1F0340 #3D0340
triadic
#1F0340 #401F03 #03401F
tetradic
#1F0340 #400305 #244003 #03403D
square
#1F0340 #400305 #244003 #03403D
split-complementary
#1F0340 #403D03 #054003
monochromatic
#0E011D #0E011D #1F0340 #3B067A #5808B5

Accessibility & contrast

On white

18.33
#1F0340 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #1F0340
18.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F0340#FFFFFF#000000##FFFFFF
##1F03401.0018.331.1518.33
#FFFFFF18.331.0021.001.00
#0000001.1521.001.0021.00
##FFFFFF18.331.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #1f0340;
/* rgb */ color: rgb(31, 3, 64);
/* oklch */ color: oklch(20.7% 0.105 297.2);
Tailwind
colors: {
  custom: {
    50: '#604775',
    500: '#1f0340',
    950: '#000000',
  },
}
SCSS
$custom: #1f0340;
$custom-light: #604775;
$custom-dark: #000000;
JSON
{
  "hex": "#1f0340",
  "rgb": {
    "r": 31,
    "g": 3,
    "b": 64
  },
  "hsl": {
    "h": 267.541,
    "s": 91.045,
    "l": 13.137
  },
  "oklch": {
    "l": 0.20735,
    "c": 0.10463,
    "h": 297.2
  },
  "luminance": 0.00727
}

Semantic roles & 50–950 ramp

primary
#1F0340
secondary
#54821D
accent
#FF299D
background
#F5F4F7
surface
#EAE6ED
border
#C6C2C8
text
#050008
muted
#79777B

Preview Lab

Preview with #1F0340

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

Preview Lab → · Contrast checker → · Palette generator →

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