#240F40#240F40

#240F40 is a very dark, moderate violet. Relative luminance 0.011; OKLCH L 23.2% C 0.088 H 299.0°. Best body text is #FFFFFF at 17.25:1 contrast (WCAG AA passes).

Color values

HEX#240F40
RGBrgb(36, 15, 64)
HSLhsl(266, 62%, 15%)
HSVhsv(266, 77%, 25%)
CMYKcmyk(43.8%, 76.6%, 0%, 74.9%)
CIE-LABlab(9.70, 23.10, -27.14)
CIE-LCHlch(9.70, 35.64, 310.40°)
OKLaboklab(23.16% 0.0428 -0.0774)
OKLCHoklch(23.16% 0.088 299)
XYZxyz(1.8236, 1.0869, 4.9632)
Luminance0.0109 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240F40 #2B400F
analogous
#0F1340 #240F40 #3C0F40
triadic
#240F40 #40240F #0F4024
tetradic
#240F40 #400F13 #2B400F #0F403C
square
#240F40 #400F13 #2B400F #0F403C
split-complementary
#240F40 #403C0F #13400F
monochromatic
#0E0619 #0E0619 #240F40 #401B72 #5C26A3

Accessibility & contrast

On white

17.25
#240F40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.22
#240F40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240F40
17.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240F40#FFFFFF#000000##FFFFFF
##240F401.0017.251.2217.25
#FFFFFF17.251.0021.001.00
#0000001.2221.001.0021.00
##FFFFFF17.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001B41
Deuteranopia (green-blind)
#001A3F
Tritanopia (blue-blind)
#1D1A26
Achromatopsia (no color)
#1B1B1B

Design tokens & code

CSS
--color: #240f40;
/* rgb */ color: rgb(36, 15, 64);
/* oklch */ color: oklch(23.2% 0.088 299.0);
Tailwind
colors: {
  custom: {
    50: '#624f75',
    500: '#240f40',
    950: '#000000',
  },
}
SCSS
$custom: #240f40;
$custom-light: #624f75;
$custom-dark: #000000;
JSON
{
  "hex": "#240f40",
  "rgb": {
    "r": 36,
    "g": 15,
    "b": 64
  },
  "hsl": {
    "h": 265.714,
    "s": 62.025,
    "l": 15.49
  },
  "oklch": {
    "l": 0.23164,
    "c": 0.08844,
    "h": 299
  },
  "luminance": 0.01087
}

Semantic roles & 50–950 ramp

primary
#240F40
secondary
#5B7A30
accent
#E543A0
background
#F5F4F7
surface
#EAE7ED
border
#C6C3C8
text
#050208
muted
#79787B

Preview Lab

Preview with #240F40

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

Preview Lab → · Contrast checker → · Palette generator →

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