#240538#240538

#240538 is a very dark, moderate violet. Relative luminance 0.008; OKLCH L 20.9% C 0.093 H 307.9°. Best body text is #FFFFFF at 18.20:1 contrast (WCAG AA passes).

Color values

HEX#240538
RGBrgb(36, 5, 56)
HSLhsl(276, 84%, 12%)
HSVhsv(276, 91%, 22%)
CMYKcmyk(35.7%, 91.1%, 0%, 78%)
CIE-LABlab(6.95, 26.38, -25.85)
CIE-LCHlch(6.95, 36.93, 315.58°)
OKLaboklab(20.95% 0.0574 -0.0738)
OKLCHoklch(20.95% 0.093 307.9)
XYZxyz(1.4955, 0.7692, 3.8103)
Luminance0.0077 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240538 #193805
analogous
#0B0538 #240538 #380533
triadic
#240538 #382405 #053824
tetradic
#240538 #380B05 #193805 #053338
square
#240538 #380B05 #193805 #053338
split-complementary
#240538 #333805 #05380B
monochromatic
#12031C #12031C #240538 #480A70 #6C0FA8

Accessibility & contrast

On white

18.20
#240538 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.15
#240538 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240538
18.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240538#FFFFFF#000000##FFFFFF
##2405381.0018.201.1518.20
#FFFFFF18.201.0021.001.00
#0000001.1521.001.0021.00
##FFFFFF18.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001439
Deuteranopia (green-blind)
#001637
Tritanopia (blue-blind)
#21121E
Achromatopsia (no color)
#151515

Design tokens & code

CSS
--color: #240538;
/* rgb */ color: rgb(36, 5, 56);
/* oklch */ color: oklch(20.9% 0.093 307.9);
Tailwind
colors: {
  custom: {
    50: '#62496f',
    500: '#240538',
    950: '#000000',
  },
}
SCSS
$custom: #240538;
$custom-light: #62496f;
$custom-dark: #000000;
JSON
{
  "hex": "#240538",
  "rgb": {
    "r": 36,
    "g": 5,
    "b": 56
  },
  "hsl": {
    "h": 276.471,
    "s": 83.607,
    "l": 11.961
  },
  "oklch": {
    "l": 0.2095,
    "c": 0.09343,
    "h": 307.9
  },
  "luminance": 0.00769
}

Semantic roles & 50–950 ramp

primary
#240538
secondary
#437920
accent
#FA2E7E
background
#F5F4F6
surface
#EAE7EC
border
#C6C3C7
text
#050107
muted
#79777A

Preview Lab

Preview with #240538

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

Preview Lab → · Contrast checker → · Palette generator →

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