#40285F#40285F

#40285F is a dark, moderate violet. Relative luminance 0.034; OKLCH L 33.5% C 0.095 H 301.6°. Best body text is #FFFFFF at 12.45:1 contrast (WCAG AA passes).

Color values

HEX#40285F
RGBrgb(64, 40, 95)
HSLhsl(266, 41%, 26%)
HSVhsv(266, 58%, 37%)
CMYKcmyk(32.6%, 57.9%, 0%, 62.7%)
CIE-LABlab(21.70, 24.06, -28.78)
CIE-LCHlch(21.70, 37.51, 309.89°)
OKLaboklab(33.51% 0.05 -0.0812)
OKLCHoklch(33.51% 0.095 301.6)
XYZxyz(4.9382, 3.4338, 11.2269)
Luminance0.0343 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40285F #475F28
analogous
#282C5F #40285F #5C285F
triadic
#40285F #5F4028 #285F40
tetradic
#40285F #5F282C #475F28 #285F5C
square
#40285F #5F282C #475F28 #285F5C
split-complementary
#40285F #5F5C28 #2C5F28
monochromatic
#0F0916 #231634 #40285F #5D3A8A #7A4DB4

Accessibility & contrast

On white

12.45
#40285F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#40285F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40285F
12.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40285F#FFFFFF#000000##FFFFFF
##40285F1.0012.451.6912.45
#FFFFFF12.451.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#133461
Deuteranopia (green-blind)
#1B345E
Tritanopia (blue-blind)
#3A333F
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #40285f;
/* rgb */ color: rgb(64, 40, 95);
/* oklch */ color: oklch(33.5% 0.095 301.6);
Tailwind
colors: {
  custom: {
    50: '#77638d',
    500: '#40285f',
    950: '#000000',
  },
}
SCSS
$custom: #40285f;
$custom-light: #77638d;
$custom-dark: #000000;
JSON
{
  "hex": "#40285f",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 95
  },
  "hsl": {
    "h": 266.182,
    "s": 40.741,
    "l": 26.471
  },
  "oklch": {
    "l": 0.3351,
    "c": 0.09534,
    "h": 301.6
  },
  "luminance": 0.03434
}

Semantic roles & 50–950 ramp

primary
#40285F
secondary
#769251
accent
#D1579C
background
#F7F5F8
surface
#EDEAF0
border
#C8C6CB
text
#09050C
muted
#7B797D

Preview Lab

Preview with #40285F

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

Preview Lab → · Contrast checker → · Palette generator →

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