#240740#240740

#240740 is a very dark, moderate violet. Relative luminance 0.009; OKLCH L 22.0% C 0.100 H 301.6°. Best body text is #FFFFFF at 17.81:1 contrast (WCAG AA passes).

Color values

HEX#240740
RGBrgb(36, 7, 64)
HSLhsl(271, 80%, 14%)
HSVhsv(271, 89%, 25%)
CMYKcmyk(43.8%, 89.1%, 0%, 74.9%)
CIE-LABlab(8.10, 27.60, -29.73)
CIE-LCHlch(8.10, 40.57, 312.86°)
OKLaboklab(22.04% 0.0522 -0.0849)
OKLCHoklch(22.04% 0.1 301.6)
XYZxyz(1.7287, 0.8972, 4.9316)
Luminance0.0090 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240740 #234007
analogous
#070740 #240740 #400740
triadic
#240740 #402407 #074024
tetradic
#240740 #400707 #234007 #074040
square
#240740 #400707 #234007 #074040
split-complementary
#240740 #404007 #074007
monochromatic
#10031C #10031C #240740 #430D77 #6213AE

Accessibility & contrast

On white

17.81
#240740 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.18
#240740 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240740
17.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240740#FFFFFF#000000##FFFFFF
##2407401.0017.811.1817.81
#FFFFFF17.811.0021.001.00
#0000001.1821.001.0021.00
##FFFFFF17.811.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #240740;
/* rgb */ color: rgb(36, 7, 64);
/* oklch */ color: oklch(22.0% 0.100 301.6);
Tailwind
colors: {
  custom: {
    50: '#624a75',
    500: '#240740',
    950: '#000000',
  },
}
SCSS
$custom: #240740;
$custom-light: #624a75;
$custom-dark: #000000;
JSON
{
  "hex": "#240740",
  "rgb": {
    "r": 36,
    "g": 7,
    "b": 64
  },
  "hsl": {
    "h": 270.526,
    "s": 80.282,
    "l": 13.922
  },
  "oklch": {
    "l": 0.22038,
    "c": 0.09968,
    "h": 301.6
  },
  "luminance": 0.00897
}

Semantic roles & 50–950 ramp

primary
#240740
secondary
#517F24
accent
#F73192
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#050108
muted
#7A777B

Preview Lab

Preview with #240740

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

Preview Lab → · Contrast checker → · Palette generator →

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