#240C42#240C42

#240C42 is a very dark, moderate violet. Relative luminance 0.010; OKLCH L 22.9% C 0.096 H 298.8°. Best body text is #FFFFFF at 17.41:1 contrast (WCAG AA passes).

Color values

HEX#240C42
RGBrgb(36, 12, 66)
HSLhsl(267, 69%, 15%)
HSVhsv(267, 82%, 26%)
CMYKcmyk(45.5%, 81.8%, 0%, 74.1%)
CIE-LABlab(9.25, 25.47, -29.28)
CIE-LCHlch(9.25, 38.81, 311.02°)
OKLaboklab(22.91% 0.0461 -0.0837)
OKLCHoklch(22.91% 0.096 298.8)
XYZxyz(1.8421, 1.0313, 5.2552)
Luminance0.0103 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240C42 #2A420C
analogous
#0C0F42 #240C42 #3F0C42
triadic
#240C42 #42240C #0C4224
tetradic
#240C42 #420C0F #2A420C #0C423F
square
#240C42 #420C0F #2A420C #0C423F
split-complementary
#240C42 #423F0C #0F420C
monochromatic
#0E051A #0E051A #240C42 #401576 #5C1FAA

Accessibility & contrast

On white

17.41
#240C42 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.21
#240C42 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240C42
17.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240C42#FFFFFF#000000##FFFFFF
##240C421.0017.411.2117.41
#FFFFFF17.411.0021.001.00
#0000001.2121.001.0021.00
##FFFFFF17.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001A44
Deuteranopia (green-blind)
#001941
Tritanopia (blue-blind)
#1D1A26
Achromatopsia (no color)
#1A1A1A

Design tokens & code

CSS
--color: #240c42;
/* rgb */ color: rgb(36, 12, 66);
/* oklch */ color: oklch(22.9% 0.096 298.8);
Tailwind
colors: {
  custom: {
    50: '#624d77',
    500: '#240c42',
    950: '#000000',
  },
}
SCSS
$custom: #240c42;
$custom-light: #624d77;
$custom-dark: #000000;
JSON
{
  "hex": "#240c42",
  "rgb": {
    "r": 36,
    "g": 12,
    "b": 66
  },
  "hsl": {
    "h": 266.667,
    "s": 69.231,
    "l": 15.294
  },
  "oklch": {
    "l": 0.22905,
    "c": 0.0955,
    "h": 298.8
  },
  "luminance": 0.01031
}

Semantic roles & 50–950 ramp

primary
#240C42
secondary
#597E2C
accent
#EC3C9E
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#050108
muted
#7A777B

Preview Lab

Preview with #240C42

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

Preview Lab → · Contrast checker → · Palette generator →

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