#40285C#40285C

#40285C is a dark, moderate violet. Relative luminance 0.034; OKLCH L 33.3% C 0.091 H 303.1°. Best body text is #FFFFFF at 12.53:1 contrast (WCAG AA passes).

Color values

HEX#40285C
RGBrgb(64, 40, 92)
HSLhsl(268, 39%, 26%)
HSVhsv(268, 57%, 36%)
CMYKcmyk(30.4%, 56.5%, 0%, 63.9%)
CIE-LABlab(21.51, 23.21, -27.11)
CIE-LCHlch(21.51, 35.69, 310.56°)
OKLaboklab(33.3% 0.0498 -0.0763)
OKLCHoklch(33.3% 0.091 303.1)
XYZxyz(4.8045, 3.3803, 10.5225)
Luminance0.0338 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40285C #445C28
analogous
#282A5C #40285C #5A285C
triadic
#40285C #5C4028 #285C40
tetradic
#40285C #5C282A #445C28 #285C5A
square
#40285C #5C282A #445C28 #285C5A
split-complementary
#40285C #5C5A28 #2A5C28
monochromatic
#0F0915 #221531 #40285C #5E3B87 #7B4DB1

Accessibility & contrast

On white

12.53
#40285C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40285C
12.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40285C#FFFFFF#000000##FFFFFF
##40285C1.0012.531.6812.53
#FFFFFF12.531.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#16335E
Deuteranopia (green-blind)
#1E335B
Tritanopia (blue-blind)
#3B323E
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #40285c;
/* rgb */ color: rgb(64, 40, 92);
/* oklch */ color: oklch(33.3% 0.091 303.1);
Tailwind
colors: {
  custom: {
    50: '#77638a',
    500: '#40285c',
    950: '#000000',
  },
}
SCSS
$custom: #40285c;
$custom-light: #77638a;
$custom-dark: #000000;
JSON
{
  "hex": "#40285c",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 92
  },
  "hsl": {
    "h": 267.692,
    "s": 39.394,
    "l": 25.882
  },
  "oklch": {
    "l": 0.33301,
    "c": 0.09112,
    "h": 303.1
  },
  "luminance": 0.0338
}

Semantic roles & 50–950 ramp

primary
#40285C
secondary
#728F51
accent
#CF5998
background
#F7F5F8
surface
#EDEAF0
border
#C8C6CB
text
#09050C
muted
#7B797D

Preview Lab

Preview with #40285C

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

Preview Lab → · Contrast checker → · Palette generator →

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