#40258D#40258D

#40258D is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.9% C 0.161 H 287.7°. Best body text is #FFFFFF at 11.25:1 contrast (WCAG AA passes).

Color values

HEX#40258D
RGBrgb(64, 37, 141)
HSLhsl(256, 58%, 35%)
HSVhsv(256, 74%, 55%)
CMYKcmyk(54.6%, 73.8%, 0%, 44.7%)
CIE-LABlab(24.75, 39.59, -53.23)
CIE-LCHlch(24.75, 66.33, 306.64°)
OKLaboklab(36.88% 0.0487 -0.153)
OKLCHoklch(36.88% 0.161 287.7)
XYZxyz(7.5822, 4.3358, 25.6315)
Luminance0.0434 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40258D #728D25
analogous
#253E8D #40258D #74258D
triadic
#40258D #8D4025 #258D40
tetradic
#40258D #8D253E #728D25 #258D74
square
#40258D #8D253E #728D25 #258D74
split-complementary
#40258D #8D7425 #3E8D25
monochromatic
#140C2C #2A185D #40258D #5632BD #7959D3

Accessibility & contrast

On white

11.25
#40258D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#40258D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40258D
11.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40258D#FFFFFF#000000##FFFFFF
##40258D1.0011.251.8711.25
#FFFFFF11.251.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D90
Deuteranopia (green-blind)
#00388B
Tritanopia (blue-blind)
#214156
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #40258d;
/* rgb */ color: rgb(64, 37, 141);
/* oklch */ color: oklch(36.9% 0.161 287.7);
Tailwind
colors: {
  custom: {
    50: '#7d62af',
    500: '#40258d',
    950: '#000000',
  },
}
SCSS
$custom: #40258d;
$custom-light: #7d62af;
$custom-dark: #000000;
JSON
{
  "hex": "#40258d",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 141
  },
  "hsl": {
    "h": 255.577,
    "s": 58.427,
    "l": 34.902
  },
  "oklch": {
    "l": 0.36877,
    "c": 0.16059,
    "h": 287.7
  },
  "luminance": 0.04336
}

Semantic roles & 50–950 ramp

primary
#40258D
secondary
#9FB856
accent
#E246B9
background
#F8F5FA
surface
#EFEAF5
border
#CAC6CF
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40258D

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

Preview Lab → · Contrast checker → · Palette generator →

#40258D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva