#40298B#40298B

#40298B is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.3% C 0.153 H 287.2°. Best body text is #FFFFFF at 11.01:1 contrast (WCAG AA passes).

Color values

HEX#40298B
RGBrgb(64, 41, 139)
HSLhsl(254, 54%, 35%)
HSVhsv(254, 71%, 55%)
CMYKcmyk(54%, 70.5%, 0%, 45.5%)
CIE-LABlab(25.38, 36.72, -50.96)
CIE-LCHlch(25.38, 62.81, 305.78°)
OKLaboklab(37.27% 0.0454 -0.1464)
OKLCHoklch(37.27% 0.153 287.2)
XYZxyz(7.5661, 4.5396, 24.8986)
Luminance0.0454 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40298B #748B29
analogous
#29438B #40298B #71298B
triadic
#40298B #8B4029 #298B40
tetradic
#40298B #8B2943 #748B29 #298B71
square
#40298B #8B2943 #748B29 #298B71
split-complementary
#40298B #8B7129 #438B29
monochromatic
#140D2C #2A1B5C #40298B #5637BA #795FD0

Accessibility & contrast

On white

11.01
#40298B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#40298B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40298B
11.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40298B#FFFFFF#000000##FFFFFF
##40298B1.0011.011.9111.01
#FFFFFF11.011.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF11.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8E
Deuteranopia (green-blind)
#003989
Tritanopia (blue-blind)
#234256
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40298b;
/* rgb */ color: rgb(64, 41, 139);
/* oklch */ color: oklch(37.3% 0.153 287.2);
Tailwind
colors: {
  custom: {
    50: '#7d65ae',
    500: '#40298b',
    950: '#000000',
  },
}
SCSS
$custom: #40298b;
$custom-light: #7d65ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40298b",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 139
  },
  "hsl": {
    "h": 254.082,
    "s": 54.444,
    "l": 35.294
  },
  "oklch": {
    "l": 0.37269,
    "c": 0.15326,
    "h": 287.2
  },
  "luminance": 0.0454
}

Semantic roles & 50–950 ramp

primary
#40298B
secondary
#A0B55B
accent
#DE4ABB
background
#F8F6FA
surface
#EFEBF4
border
#CAC6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40298B

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

Preview Lab → · Contrast checker → · Palette generator →

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