#400238#400238

#400238 is a dark, moderate purple. Relative luminance 0.014; OKLCH L 25.7% C 0.111 H 334.6°. Best body text is #FFFFFF at 16.36:1 contrast (WCAG AA passes).

Color values

HEX#400238
RGBrgb(64, 2, 56)
HSLhsl(308, 94%, 13%)
HSVhsv(308, 97%, 25%)
CMYKcmyk(0%, 96.9%, 12.5%, 74.9%)
CIE-LABlab(12.08, 34.28, -17.30)
CIE-LCHlch(12.08, 38.40, 333.21°)
OKLaboklab(25.7% 0.1001 -0.0475)
OKLCHoklch(25.7% 0.111 334.6)
XYZxyz(2.8499, 1.4192, 3.8645)
Luminance0.0142 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400238 #02400A
analogous
#290240 #400238 #400219
triadic
#400238 #384002 #023840
tetradic
#400238 #402902 #02400A #021940
square
#400238 #402902 #02400A #021940
split-complementary
#400238 #194002 #024029
monochromatic
#1E011A #1E011A #400238 #7B046C #B706A0

Accessibility & contrast

On white

16.36
#400238 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.28
#400238 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400238
16.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400238#FFFFFF#000000##FFFFFF
##4002381.0016.361.2816.36
#FFFFFF16.361.0021.001.00
#0000001.2821.001.0021.00
##FFFFFF16.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#011A39
Deuteranopia (green-blind)
#1A2337
Tritanopia (blue-blind)
#44081E
Achromatopsia (no color)
#202020

Design tokens & code

CSS
--color: #400238;
/* rgb */ color: rgb(64, 2, 56);
/* oklch */ color: oklch(25.7% 0.111 334.6);
Tailwind
colors: {
  custom: {
    50: '#784c6f',
    500: '#400238',
    950: '#000000',
  },
}
SCSS
$custom: #400238;
$custom-light: #784c6f;
$custom-dark: #000000;
JSON
{
  "hex": "#400238",
  "rgb": {
    "r": 64,
    "g": 2,
    "b": 56
  },
  "hsl": {
    "h": 307.742,
    "s": 93.939,
    "l": 12.941
  },
  "oklch": {
    "l": 0.25699,
    "c": 0.11078,
    "h": 334.6
  },
  "luminance": 0.01419
}

Semantic roles & 50–950 ramp

primary
#400238
secondary
#1B8328
accent
#FF4429
background
#F7F4F6
surface
#EDE7EC
border
#C8C3C7
text
#090207
muted
#7B787A

Preview Lab

Preview with #400238

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

Preview Lab → · Contrast checker → · Palette generator →

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