#240840#240840

#240840 is a very dark, moderate violet. Relative luminance 0.009; OKLCH L 22.2% C 0.098 H 301.3°. Best body text is #FFFFFF at 17.74:1 contrast (WCAG AA passes).

Color values

HEX#240840
RGBrgb(36, 8, 64)
HSLhsl(270, 78%, 14%)
HSVhsv(270, 88%, 25%)
CMYKcmyk(43.8%, 87.5%, 0%, 74.9%)
CIE-LABlab(8.30, 27.04, -29.42)
CIE-LCHlch(8.30, 39.96, 312.59°)
OKLaboklab(22.17% 0.051 -0.084)
OKLCHoklch(22.17% 0.098 301.3)
XYZxyz(1.7396, 0.9189, 4.9352)
Luminance0.0092 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240840 #244008
analogous
#080840 #240840 #400840
triadic
#240840 #402408 #084024
tetradic
#240840 #400808 #244008 #084040
square
#240840 #400808 #244008 #084040
split-complementary
#240840 #404008 #084008
monochromatic
#0F031B #0F031B #240840 #430F76 #6116AD

Accessibility & contrast

On white

17.74
#240840 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.18
#240840 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240840
17.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240840#FFFFFF#000000##FFFFFF
##2408401.0017.741.1817.74
#FFFFFF17.741.0021.001.00
#0000001.1821.001.0021.00
##FFFFFF17.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001842
Deuteranopia (green-blind)
#00183F
Tritanopia (blue-blind)
#1E1724
Achromatopsia (no color)
#181818

Design tokens & code

CSS
--color: #240840;
/* rgb */ color: rgb(36, 8, 64);
/* oklch */ color: oklch(22.2% 0.098 301.3);
Tailwind
colors: {
  custom: {
    50: '#624b75',
    500: '#240840',
    950: '#000000',
  },
}
SCSS
$custom: #240840;
$custom-light: #624b75;
$custom-dark: #000000;
JSON
{
  "hex": "#240840",
  "rgb": {
    "r": 36,
    "g": 8,
    "b": 64
  },
  "hsl": {
    "h": 270,
    "s": 77.778,
    "l": 14.118
  },
  "oklch": {
    "l": 0.22173,
    "c": 0.0983,
    "h": 301.3
  },
  "luminance": 0.00919
}

Semantic roles & 50–950 ramp

primary
#240840
secondary
#527E25
accent
#F43494
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#050108
muted
#7A777B

Preview Lab

Preview with #240840

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

Preview Lab → · Contrast checker → · Palette generator →

#240840 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva