#240842#240842

#240842 is a very dark, moderate violet. Relative luminance 0.009; OKLCH L 22.4% C 0.101 H 300.0°. Best body text is #FFFFFF at 17.67:1 contrast (WCAG AA passes).

Color values

HEX#240842
RGBrgb(36, 8, 66)
HSLhsl(269, 78%, 15%)
HSVhsv(269, 88%, 26%)
CMYKcmyk(45.5%, 87.9%, 0%, 74.1%)
CIE-LABlab(8.50, 27.61, -30.51)
CIE-LCHlch(8.50, 41.15, 312.15°)
OKLaboklab(22.38% 0.0504 -0.0872)
OKLCHoklch(22.38% 0.101 300)
XYZxyz(1.7975, 0.9421, 5.2403)
Luminance0.0094 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240842 #264208
analogous
#080942 #240842 #410842
triadic
#240842 #422408 #084224
tetradic
#240842 #420809 #264208 #084241
square
#240842 #420809 #264208 #084241
split-complementary
#240842 #424108 #094208
monochromatic
#0F031B #0F031B #240842 #420F79 #6015AF

Accessibility & contrast

On white

17.67
#240842 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.19
#240842 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240842
17.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240842#FFFFFF#000000##FFFFFF
##2408421.0017.671.1917.67
#FFFFFF17.671.0021.001.00
#0000001.1921.001.0021.00
##FFFFFF17.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001844
Deuteranopia (green-blind)
#001841
Tritanopia (blue-blind)
#1D1825
Achromatopsia (no color)
#181818

Design tokens & code

CSS
--color: #240842;
/* rgb */ color: rgb(36, 8, 66);
/* oklch */ color: oklch(22.4% 0.101 300.0);
Tailwind
colors: {
  custom: {
    50: '#634b77',
    500: '#240842',
    950: '#000000',
  },
}
SCSS
$custom: #240842;
$custom-light: #634b77;
$custom-dark: #000000;
JSON
{
  "hex": "#240842",
  "rgb": {
    "r": 36,
    "g": 8,
    "b": 66
  },
  "hsl": {
    "h": 268.966,
    "s": 78.378,
    "l": 14.51
  },
  "oklch": {
    "l": 0.22377,
    "c": 0.10072,
    "h": 300
  },
  "luminance": 0.00942
}

Semantic roles & 50–950 ramp

primary
#240842
secondary
#548025
accent
#F53397
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#050109
muted
#7A777B

Preview Lab

Preview with #240842

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

Preview Lab → · Contrast checker → · Palette generator →

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