#240F42#240F42

#240F42 is a very dark, moderate violet. Relative luminance 0.011; OKLCH L 23.4% C 0.091 H 297.8°. Best body text is #FFFFFF at 17.18:1 contrast (WCAG AA passes).

Color values

HEX#240F42
RGBrgb(36, 15, 66)
HSLhsl(265, 63%, 16%)
HSVhsv(265, 77%, 26%)
CMYKcmyk(45.5%, 77.3%, 0%, 74.1%)
CIE-LABlab(9.88, 23.72, -28.26)
CIE-LCHlch(9.88, 36.90, 310.01°)
OKLaboklab(23.35% 0.0425 -0.0807)
OKLCHoklch(23.35% 0.091 297.8)
XYZxyz(1.8815, 1.1100, 5.2683)
Luminance0.0111 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240F42 #2D420F
analogous
#0F1342 #240F42 #3D0F42
triadic
#240F42 #42240F #0F4224
tetradic
#240F42 #420F13 #2D420F #0F423D
square
#240F42 #420F13 #2D420F #0F423D
split-complementary
#240F42 #423D0F #13420F
monochromatic
#0E0619 #0E0619 #240F42 #3F1A74 #5A26A6

Accessibility & contrast

On white

17.18
#240F42 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.22
#240F42 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240F42
17.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240F42#FFFFFF#000000##FFFFFF
##240F421.0017.181.2217.18
#FFFFFF17.181.0021.001.00
#0000001.2221.001.0021.00
##FFFFFF17.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001B44
Deuteranopia (green-blind)
#001B41
Tritanopia (blue-blind)
#1D1B27
Achromatopsia (no color)
#1B1B1B

Design tokens & code

CSS
--color: #240f42;
/* rgb */ color: rgb(36, 15, 66);
/* oklch */ color: oklch(23.4% 0.091 297.8);
Tailwind
colors: {
  custom: {
    50: '#624f77',
    500: '#240f42',
    950: '#000000',
  },
}
SCSS
$custom: #240f42;
$custom-light: #624f77;
$custom-dark: #000000;
JSON
{
  "hex": "#240f42",
  "rgb": {
    "r": 36,
    "g": 15,
    "b": 66
  },
  "hsl": {
    "h": 264.706,
    "s": 62.963,
    "l": 15.882
  },
  "oklch": {
    "l": 0.2335,
    "c": 0.09118,
    "h": 297.8
  },
  "luminance": 0.0111
}

Semantic roles & 50–950 ramp

primary
#240F42
secondary
#5D7C30
accent
#E642A2
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#050208
muted
#7A787B

Preview Lab

Preview with #240F42

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

Preview Lab → · Contrast checker → · Palette generator →

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