#40285E#40285E

#40285E is a dark, moderate violet. Relative luminance 0.034; OKLCH L 33.4% C 0.094 H 302.1°. Best body text is #FFFFFF at 12.48:1 contrast (WCAG AA passes).

Color values

HEX#40285E
RGBrgb(64, 40, 94)
HSLhsl(267, 40%, 26%)
HSVhsv(267, 57%, 37%)
CMYKcmyk(31.9%, 57.4%, 0%, 63.1%)
CIE-LABlab(21.64, 23.77, -28.23)
CIE-LCHlch(21.64, 36.90, 310.11°)
OKLaboklab(33.44% 0.0499 -0.0796)
OKLCHoklch(33.44% 0.094 302.1)
XYZxyz(4.8931, 3.4157, 10.9890)
Luminance0.0342 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40285E #465E28
analogous
#282B5E #40285E #5B285E
triadic
#40285E #5E4028 #285E40
tetradic
#40285E #5E282B #465E28 #285E5B
square
#40285E #5E282B #465E28 #285E5B
split-complementary
#40285E #5E5B28 #2B5E28
monochromatic
#0F0915 #231633 #40285E #5D3A89 #7B4DB3

Accessibility & contrast

On white

12.48
#40285E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#40285E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40285E
12.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40285E#FFFFFF#000000##FFFFFF
##40285E1.0012.481.6812.48
#FFFFFF12.481.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#143360
Deuteranopia (green-blind)
#1C345D
Tritanopia (blue-blind)
#3A323E
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #40285e;
/* rgb */ color: rgb(64, 40, 94);
/* oklch */ color: oklch(33.4% 0.094 302.1);
Tailwind
colors: {
  custom: {
    50: '#77638c',
    500: '#40285e',
    950: '#000000',
  },
}
SCSS
$custom: #40285e;
$custom-light: #77638c;
$custom-dark: #000000;
JSON
{
  "hex": "#40285e",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 94
  },
  "hsl": {
    "h": 266.667,
    "s": 40.299,
    "l": 26.275
  },
  "oklch": {
    "l": 0.33439,
    "c": 0.09394,
    "h": 302.1
  },
  "luminance": 0.03416
}

Semantic roles & 50–950 ramp

primary
#40285E
secondary
#749151
accent
#D0589B
background
#F7F5F8
surface
#EDEAF0
border
#C8C6CB
text
#09050C
muted
#7B797D

Preview Lab

Preview with #40285E

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

Preview Lab → · Contrast checker → · Palette generator →

#40285E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva