#240338#240338

#240338 is a very dark, moderate violet. Relative luminance 0.007; OKLCH L 20.6% C 0.097 H 308.5°. Best body text is #FFFFFF at 18.34:1 contrast (WCAG AA passes).

Color values

HEX#240338
RGBrgb(36, 3, 56)
HSLhsl(277, 90%, 12%)
HSVhsv(277, 95%, 22%)
CMYKcmyk(35.7%, 94.6%, 0%, 78%)
CIE-LABlab(6.56, 27.46, -26.49)
CIE-LCHlch(6.56, 38.15, 316.03°)
OKLaboklab(20.64% 0.0603 -0.0758)
OKLCHoklch(20.64% 0.097 308.5)
XYZxyz(1.4738, 0.7257, 3.8031)
Luminance0.0073 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#240338 #173803
analogous
#090338 #240338 #380332
triadic
#240338 #382403 #033824
tetradic
#240338 #380903 #173803 #033238
square
#240338 #380903 #173803 #033238
split-complementary
#240338 #323803 #033809
monochromatic
#13021D #13021D #240338 #490672 #6F09AC

Accessibility & contrast

On white

18.34
#240338 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.15
#240338 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #240338
18.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##240338#FFFFFF#000000##FFFFFF
##2403381.0018.341.1518.34
#FFFFFF18.341.0021.001.00
#0000001.1521.001.0021.00
##FFFFFF18.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001339
Deuteranopia (green-blind)
#001537
Tritanopia (blue-blind)
#21101E
Achromatopsia (no color)
#151515

Design tokens & code

CSS
--color: #240338;
/* rgb */ color: rgb(36, 3, 56);
/* oklch */ color: oklch(20.6% 0.097 308.5);
Tailwind
colors: {
  custom: {
    50: '#62476f',
    500: '#240338',
    950: '#000000',
  },
}
SCSS
$custom: #240338;
$custom-light: #62476f;
$custom-dark: #000000;
JSON
{
  "hex": "#240338",
  "rgb": {
    "r": 36,
    "g": 3,
    "b": 56
  },
  "hsl": {
    "h": 277.358,
    "s": 89.831,
    "l": 11.569
  },
  "oklch": {
    "l": 0.20644,
    "c": 0.09686,
    "h": 308.5
  },
  "luminance": 0.00726
}

Semantic roles & 50–950 ramp

primary
#240338
secondary
#407B1C
accent
#FF297A
background
#F6F4F6
surface
#EBE6EC
border
#C6C2C7
text
#050007
muted
#7A777A

Preview Lab

Preview with #240338

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

Preview Lab → · Contrast checker → · Palette generator →

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