#40298E#40298E

#40298E is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.5% C 0.157 H 286.6°. Best body text is #FFFFFF at 10.90:1 contrast (WCAG AA passes).

Color values

HEX#40298E
RGBrgb(64, 41, 142)
HSLhsl(254, 55%, 36%)
HSVhsv(254, 71%, 56%)
CMYKcmyk(54.9%, 71.1%, 0%, 44.3%)
CIE-LABlab(25.65, 37.65, -52.38)
CIE-LCHlch(25.65, 64.51, 305.71°)
OKLaboklab(37.54% 0.0449 -0.1505)
OKLCHoklch(37.54% 0.157 286.6)
XYZxyz(7.7883, 4.6285, 26.0689)
Luminance0.0463 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40298E #778E29
analogous
#29458E #40298E #72298E
triadic
#40298E #8E4029 #298E40
tetradic
#40298E #8E2945 #778E29 #298E72
square
#40298E #8E2945 #778E29 #298E72
split-complementary
#40298E #8E7229 #458E29
monochromatic
#150E2F #2B1B5F #40298E #5537BD #7A60D1

Accessibility & contrast

On white

10.90
#40298E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#40298E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40298E
10.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40298E#FFFFFF#000000##FFFFFF
##40298E1.0010.901.9310.90
#FFFFFF10.901.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F91
Deuteranopia (green-blind)
#003A8C
Tritanopia (blue-blind)
#204358
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40298e;
/* rgb */ color: rgb(64, 41, 142);
/* oklch */ color: oklch(37.5% 0.157 286.6);
Tailwind
colors: {
  custom: {
    50: '#7d65b0',
    500: '#40298e',
    950: '#000000',
  },
}
SCSS
$custom: #40298e;
$custom-light: #7d65b0;
$custom-dark: #000000;
JSON
{
  "hex": "#40298e",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 142
  },
  "hsl": {
    "h": 253.663,
    "s": 55.191,
    "l": 35.882
  },
  "oklch": {
    "l": 0.37544,
    "c": 0.1571,
    "h": 286.6
  },
  "luminance": 0.04629
}

Semantic roles & 50–950 ramp

primary
#40298E
secondary
#A2B75C
accent
#DF49BD
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #40298E

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

Preview Lab → · Contrast checker → · Palette generator →

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