#240540#240540

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

Color values

HEX#240540
RGBrgb(36, 5, 64)
HSLhsl(272, 86%, 14%)
HSVhsv(272, 92%, 25%)
CMYKcmyk(43.8%, 92.2%, 0%, 74.9%)
CIE-LABlab(7.71, 28.73, -30.37)
CIE-LCHlch(7.71, 41.81, 313.41°)
OKLaboklab(21.76% 0.0546 -0.0868)
OKLCHoklch(21.76% 0.103 302.1)
XYZxyz(1.7070, 0.8538, 4.9244)
Luminance0.0085 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240540 #214005
analogous
#060540 #240540 #40053E
triadic
#240540 #402405 #054024
tetradic
#240540 #400605 #214005 #053E40
square
#240540 #400605 #214005 #053E40
split-complementary
#240540 #3E4005 #054006
monochromatic
#10021C #10021C #240540 #440979 #640EB2

Accessibility & contrast

On white

17.94
#240540 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.17
#240540 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240540
17.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240540#FFFFFF#000000##FFFFFF
##2405401.0017.941.1717.94
#FFFFFF17.941.0021.001.00
#0000001.1721.001.0021.00
##FFFFFF17.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001742
Deuteranopia (green-blind)
#00173F
Tritanopia (blue-blind)
#1E1523
Achromatopsia (no color)
#171717

Design tokens & code

CSS
--color: #240540;
/* rgb */ color: rgb(36, 5, 64);
/* oklch */ color: oklch(21.8% 0.103 302.1);
Tailwind
colors: {
  custom: {
    50: '#634975',
    500: '#240540',
    950: '#000000',
  },
}
SCSS
$custom: #240540;
$custom-light: #634975;
$custom-dark: #000000;
JSON
{
  "hex": "#240540",
  "rgb": {
    "r": 36,
    "g": 5,
    "b": 64
  },
  "hsl": {
    "h": 271.525,
    "s": 85.507,
    "l": 13.529
  },
  "oklch": {
    "l": 0.21763,
    "c": 0.10253,
    "h": 302.1
  },
  "luminance": 0.00854
}

Semantic roles & 50–950 ramp

primary
#240540
secondary
#4E8120
accent
#FC2C8F
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#050108
muted
#7A777B

Preview Lab

Preview with #240540

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

Preview Lab → · Contrast checker → · Palette generator →

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