#240340#240340

#240340 is a very dark, moderate violet. Relative luminance 0.008; OKLCH L 21.5% C 0.105 H 302.7°. Best body text is #FFFFFF at 18.07:1 contrast (WCAG AA passes).

Color values

HEX#240340
RGBrgb(36, 3, 64)
HSLhsl(272, 91%, 13%)
HSVhsv(272, 95%, 25%)
CMYKcmyk(43.8%, 95.3%, 0%, 74.9%)
CIE-LABlab(7.32, 29.86, -31.01)
CIE-LCHlch(7.32, 43.05, 313.92°)
OKLaboklab(21.48% 0.057 -0.0887)
OKLCHoklch(21.48% 0.105 302.7)
XYZxyz(1.6853, 0.8104, 4.9171)
Luminance0.0081 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240340 #1F4003
analogous
#050340 #240340 #40033D
triadic
#240340 #402403 #034024
tetradic
#240340 #400503 #1F4003 #033D40
square
#240340 #400503 #1F4003 #033D40
split-complementary
#240340 #3D4003 #034005
monochromatic
#10011D #10011D #240340 #45067A #6608B5

Accessibility & contrast

On white

18.07
#240340 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.16
#240340 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240340
18.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240340#FFFFFF#000000##FFFFFF
##2403401.0018.071.1618.07
#FFFFFF18.071.0021.001.00
#0000001.1621.001.0021.00
##FFFFFF18.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001642
Deuteranopia (green-blind)
#00163F
Tritanopia (blue-blind)
#1E1422
Achromatopsia (no color)
#161616

Design tokens & code

CSS
--color: #240340;
/* rgb */ color: rgb(36, 3, 64);
/* oklch */ color: oklch(21.5% 0.105 302.7);
Tailwind
colors: {
  custom: {
    50: '#634875',
    500: '#240340',
    950: '#000000',
  },
}
SCSS
$custom: #240340;
$custom-light: #634875;
$custom-dark: #000000;
JSON
{
  "hex": "#240340",
  "rgb": {
    "r": 36,
    "g": 3,
    "b": 64
  },
  "hsl": {
    "h": 272.459,
    "s": 91.045,
    "l": 13.137
  },
  "oklch": {
    "l": 0.21482,
    "c": 0.10548,
    "h": 302.7
  },
  "luminance": 0.0081
}

Semantic roles & 50–950 ramp

primary
#240340
secondary
#4B821D
accent
#FF298B
background
#F6F4F7
surface
#EBE6ED
border
#C6C2C8
text
#060108
muted
#7A777B

Preview Lab

Preview with #240340

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

Preview Lab → · Contrast checker → · Palette generator →

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