#240C40#240C40

#240C40 is a very dark, moderate violet. Relative luminance 0.010; OKLCH L 22.7% C 0.093 H 300.1°. Best body text is #FFFFFF at 17.48:1 contrast (WCAG AA passes).

Color values

HEX#240C40
RGBrgb(36, 12, 64)
HSLhsl(268, 68%, 15%)
HSVhsv(268, 81%, 25%)
CMYKcmyk(43.8%, 81.2%, 0%, 74.9%)
CIE-LABlab(9.06, 24.87, -28.17)
CIE-LCHlch(9.06, 37.58, 311.43°)
OKLaboklab(22.71% 0.0465 -0.0804)
OKLCHoklch(22.71% 0.093 300.1)
XYZxyz(1.7842, 1.0082, 4.9501)
Luminance0.0101 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240C40 #28400C
analogous
#0C0E40 #240C40 #3E0C40
triadic
#240C40 #40240C #0C4024
tetradic
#240C40 #400C0E #28400C #0C403E
square
#240C40 #400C0E #28400C #0C403E
split-complementary
#240C40 #403E0C #0E400C
monochromatic
#0E051A #0E051A #240C40 #411674 #5E1FA7

Accessibility & contrast

On white

17.48
#240C40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.20
#240C40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240C40
17.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240C40#FFFFFF#000000##FFFFFF
##240C401.0017.481.2017.48
#FFFFFF17.481.0021.001.00
#0000001.2021.001.0021.00
##FFFFFF17.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001942
Deuteranopia (green-blind)
#00193F
Tritanopia (blue-blind)
#1E1925
Achromatopsia (no color)
#1A1A1A

Design tokens & code

CSS
--color: #240c40;
/* rgb */ color: rgb(36, 12, 64);
/* oklch */ color: oklch(22.7% 0.093 300.1);
Tailwind
colors: {
  custom: {
    50: '#624d75',
    500: '#240c40',
    950: '#000000',
  },
}
SCSS
$custom: #240c40;
$custom-light: #624d75;
$custom-dark: #000000;
JSON
{
  "hex": "#240c40",
  "rgb": {
    "r": 36,
    "g": 12,
    "b": 64
  },
  "hsl": {
    "h": 267.692,
    "s": 68.421,
    "l": 14.902
  },
  "oklch": {
    "l": 0.2271,
    "c": 0.09289,
    "h": 300.1
  },
  "luminance": 0.01008
}

Semantic roles & 50–950 ramp

primary
#240C40
secondary
#577C2C
accent
#EB3D9B
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#050108
muted
#7A777B

Preview Lab

Preview with #240C40

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

Preview Lab → · Contrast checker → · Palette generator →

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