#40258E#40258E

#40258E is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.0% C 0.162 H 287.4°. Best body text is #FFFFFF at 11.21:1 contrast (WCAG AA passes).

Color values

HEX#40258E
RGBrgb(64, 37, 142)
HSLhsl(255, 59%, 35%)
HSVhsv(255, 74%, 56%)
CMYKcmyk(54.9%, 73.9%, 0%, 44.3%)
CIE-LABlab(24.85, 39.89, -53.70)
CIE-LCHlch(24.85, 66.89, 306.61°)
OKLaboklab(36.97% 0.0485 -0.1544)
OKLCHoklch(36.97% 0.162 287.4)
XYZxyz(7.6570, 4.3657, 26.0251)
Luminance0.0437 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40258E #738E25
analogous
#253E8E #40258E #75258E
triadic
#40258E #8E4025 #258E40
tetradic
#40258E #8E253E #738E25 #258E75
square
#40258E #8E253E #738E25 #258E75
split-complementary
#40258E #8E7525 #3E8E25
monochromatic
#140C2D #2A185D #40258E #5632BF #795AD4

Accessibility & contrast

On white

11.21
#40258E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40258E
11.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40258E#FFFFFF#000000##FFFFFF
##40258E1.0011.211.8711.21
#FFFFFF11.211.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D91
Deuteranopia (green-blind)
#00388C
Tritanopia (blue-blind)
#204157
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #40258e;
/* rgb */ color: rgb(64, 37, 142);
/* oklch */ color: oklch(37.0% 0.162 287.4);
Tailwind
colors: {
  custom: {
    50: '#7e62b0',
    500: '#40258e',
    950: '#000000',
  },
}
SCSS
$custom: #40258e;
$custom-light: #7e62b0;
$custom-dark: #000000;
JSON
{
  "hex": "#40258e",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 142
  },
  "hsl": {
    "h": 255.429,
    "s": 58.659,
    "l": 35.098
  },
  "oklch": {
    "l": 0.36972,
    "c": 0.16182,
    "h": 287.4
  },
  "luminance": 0.04366
}

Semantic roles & 50–950 ramp

primary
#40258E
secondary
#9FB956
accent
#E246BA
background
#F8F5FA
surface
#EFEAF5
border
#CAC6CF
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #40258E

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

Preview Lab → · Contrast checker → · Palette generator →

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