#240F5B#240F5B

#240F5B is a dark, vivid violet. Relative luminance 0.015; OKLCH L 25.9% C 0.124 H 286.7°. Best body text is #FFFFFF at 16.22:1 contrast (WCAG AA passes).

Color values

HEX#240F5B
RGBrgb(36, 15, 91)
HSLhsl(257, 72%, 21%)
HSVhsv(257, 84%, 36%)
CMYKcmyk(60.4%, 83.5%, 0%, 64.3%)
CIE-LABlab(12.43, 31.63, -41.32)
CIE-LCHlch(12.43, 52.04, 307.43°)
OKLaboklab(25.93% 0.0357 -0.119)
OKLCHoklch(25.93% 0.124 286.7)
XYZxyz(2.7861, 1.4719, 10.0328)
Luminance0.0147 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240F5B #465B0F
analogous
#0F205B #240F5B #4A0F5B
triadic
#240F5B #5B240F #0F5B24
tetradic
#240F5B #5B0F20 #465B0F #0F5B4A
square
#240F5B #5B0F20 #465B0F #0F5B4A
split-complementary
#240F5B #5B4A0F #205B0F
monochromatic
#0A041A #0F0626 #240F5B #391890 #4E20C4

Accessibility & contrast

On white

16.22
#240F5B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.29
#240F5B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240F5B
16.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240F5B#FFFFFF#000000##FFFFFF
##240F5B1.0016.221.2916.22
#FFFFFF16.221.0021.001.00
#0000001.2921.001.0021.00
##FFFFFF16.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00225D
Deuteranopia (green-blind)
#001E5A
Tritanopia (blue-blind)
#0A2535
Achromatopsia (no color)
#202020

Design tokens & code

CSS
--color: #240f5b;
/* rgb */ color: rgb(36, 15, 91);
/* oklch */ color: oklch(25.9% 0.124 286.7);
Tailwind
colors: {
  custom: {
    50: '#67508a',
    500: '#240f5b',
    950: '#000000',
  },
}
SCSS
$custom: #240f5b;
$custom-light: #67508a;
$custom-dark: #000000;
JSON
{
  "hex": "#240f5b",
  "rgb": {
    "r": 36,
    "g": 15,
    "b": 91
  },
  "hsl": {
    "h": 256.579,
    "s": 71.698,
    "l": 20.784
  },
  "oklch": {
    "l": 0.25933,
    "c": 0.1242,
    "h": 286.7
  },
  "luminance": 0.01472
}

Semantic roles & 50–950 ramp

primary
#240F5B
secondary
#799531
accent
#EE39BC
background
#F6F4F8
surface
#EBE7F0
border
#C6C3CB
text
#06020C
muted
#7A787D

Preview Lab

Preview with #240F5B

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

Preview Lab → · Contrast checker → · Palette generator →

#240F5B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva