#240642#240642

#240642 is a very dark, moderate violet. Relative luminance 0.009; OKLCH L 22.1% C 0.103 H 300.6°. Best body text is #FFFFFF at 17.80:1 contrast (WCAG AA passes).

Color values

HEX#240642
RGBrgb(36, 6, 66)
HSLhsl(270, 83%, 14%)
HSVhsv(270, 91%, 26%)
CMYKcmyk(45.5%, 90.9%, 0%, 74.1%)
CIE-LABlab(8.12, 28.72, -31.14)
CIE-LCHlch(8.12, 42.36, 312.69°)
OKLaboklab(22.11% 0.0526 -0.089)
OKLCHoklch(22.11% 0.103 300.6)
XYZxyz(1.7758, 0.8986, 5.2331)
Luminance0.0090 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240642 #244206
analogous
#060642 #240642 #420642
triadic
#240642 #422406 #064224
tetradic
#240642 #420606 #244206 #064242
square
#240642 #420606 #244206 #064242
split-complementary
#240642 #424206 #064206
monochromatic
#0F031C #0F031C #240642 #430B7A #6110B2

Accessibility & contrast

On white

17.80
#240642 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #240642
17.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240642#FFFFFF#000000##FFFFFF
##2406421.0017.801.1817.80
#FFFFFF17.801.0021.001.00
#0000001.1821.001.0021.00
##FFFFFF17.801.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #240642;
/* rgb */ color: rgb(36, 6, 66);
/* oklch */ color: oklch(22.1% 0.103 300.6);
Tailwind
colors: {
  custom: {
    50: '#634a77',
    500: '#240642',
    950: '#000000',
  },
}
SCSS
$custom: #240642;
$custom-light: #634a77;
$custom-dark: #000000;
JSON
{
  "hex": "#240642",
  "rgb": {
    "r": 36,
    "g": 6,
    "b": 66
  },
  "hsl": {
    "h": 270,
    "s": 83.333,
    "l": 14.118
  },
  "oklch": {
    "l": 0.22111,
    "c": 0.10341,
    "h": 300.6
  },
  "luminance": 0.00899
}

Semantic roles & 50–950 ramp

primary
#240642
secondary
#528222
accent
#FA2E94
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#050109
muted
#7A777B

Preview Lab

Preview with #240642

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

Preview Lab → · Contrast checker → · Palette generator →

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