#40286B#40286B

#40286B is a dark, moderate violet. Relative luminance 0.037; OKLCH L 34.4% C 0.112 H 296.6°. Best body text is #FFFFFF at 12.11:1 contrast (WCAG AA passes).

Color values

HEX#40286B
RGBrgb(64, 40, 107)
HSLhsl(261, 46%, 29%)
HSVhsv(261, 63%, 42%)
CMYKcmyk(40.2%, 62.6%, 0%, 58%)
CIE-LABlab(22.55, 27.56, -35.26)
CIE-LCHlch(22.55, 44.75, 308.01°)
OKLaboklab(34.4% 0.0501 -0.1002)
OKLCHoklch(34.4% 0.112 296.6)
XYZxyz(5.5263, 3.6690, 14.3241)
Luminance0.0367 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40286B #536B28
analogous
#28326B #40286B #62286B
triadic
#40286B #6B4028 #286B40
tetradic
#40286B #6B2832 #536B28 #286B62
square
#40286B #6B2832 #536B28 #286B62
split-complementary
#40286B #6B6228 #326B28
monochromatic
#0D0816 #25173E #40286B #5B3998 #7750BE

Accessibility & contrast

On white

12.11
#40286B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#40286B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40286B
12.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40286B#FFFFFF#000000##FFFFFF
##40286B1.0012.111.7312.11
#FFFFFF12.111.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00366D
Deuteranopia (green-blind)
#0C356A
Tritanopia (blue-blind)
#363645
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40286b;
/* rgb */ color: rgb(64, 40, 107);
/* oklch */ color: oklch(34.4% 0.112 296.6);
Tailwind
colors: {
  custom: {
    50: '#786396',
    500: '#40286b',
    950: '#000000',
  },
}
SCSS
$custom: #40286b;
$custom-light: #786396;
$custom-dark: #000000;
JSON
{
  "hex": "#40286b",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 107
  },
  "hsl": {
    "h": 261.493,
    "s": 45.578,
    "l": 28.824
  },
  "oklch": {
    "l": 0.34399,
    "c": 0.11206,
    "h": 296.6
  },
  "luminance": 0.03669
}

Semantic roles & 50–950 ramp

primary
#40286B
secondary
#829D51
accent
#D553A6
background
#F7F5F9
surface
#EDEAF2
border
#C8C6CC
text
#09050D
muted
#7B797E

Preview Lab

Preview with #40286B

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

Preview Lab → · Contrast checker → · Palette generator →

#40286B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva