#240742#240742

#240742 is a very dark, moderate violet. Relative luminance 0.009; OKLCH L 22.2% C 0.102 H 300.3°. Best body text is #FFFFFF at 17.74:1 contrast (WCAG AA passes).

Color values

HEX#240742
RGBrgb(36, 7, 66)
HSLhsl(269, 81%, 14%)
HSVhsv(269, 89%, 26%)
CMYKcmyk(45.5%, 89.4%, 0%, 74.1%)
CIE-LABlab(8.31, 28.16, -30.82)
CIE-LCHlch(8.31, 41.75, 312.42°)
OKLaboklab(22.25% 0.0515 -0.0881)
OKLCHoklch(22.25% 0.102 300.3)
XYZxyz(1.7867, 0.9204, 5.2367)
Luminance0.0092 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240742 #254207
analogous
#070742 #240742 #420742
triadic
#240742 #422407 #074224
tetradic
#240742 #420707 #254207 #074242
square
#240742 #420707 #254207 #074242
split-complementary
#240742 #424207 #074207
monochromatic
#0F031C #0F031C #240742 #420D79 #6013B1

Accessibility & contrast

On white

17.74
#240742 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #240742
17.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240742#FFFFFF#000000##FFFFFF
##2407421.0017.741.1817.74
#FFFFFF17.741.0021.001.00
#0000001.1821.001.0021.00
##FFFFFF17.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001844
Deuteranopia (green-blind)
#001841
Tritanopia (blue-blind)
#1D1725
Achromatopsia (no color)
#181818

Design tokens & code

CSS
--color: #240742;
/* rgb */ color: rgb(36, 7, 66);
/* oklch */ color: oklch(22.2% 0.102 300.3);
Tailwind
colors: {
  custom: {
    50: '#634a77',
    500: '#240742',
    950: '#000000',
  },
}
SCSS
$custom: #240742;
$custom-light: #634a77;
$custom-dark: #000000;
JSON
{
  "hex": "#240742",
  "rgb": {
    "r": 36,
    "g": 7,
    "b": 66
  },
  "hsl": {
    "h": 269.492,
    "s": 80.822,
    "l": 14.314
  },
  "oklch": {
    "l": 0.22245,
    "c": 0.10206,
    "h": 300.3
  },
  "luminance": 0.0092
}

Semantic roles & 50–950 ramp

primary
#240742
secondary
#538124
accent
#F73196
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#050109
muted
#7A777B

Preview Lab

Preview with #240742

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

Preview Lab → · Contrast checker → · Palette generator →

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