#40298C#40298C

#40298C is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.4% C 0.155 H 287.0°. Best body text is #FFFFFF at 10.97:1 contrast (WCAG AA passes).

Color values

HEX#40298C
RGBrgb(64, 41, 140)
HSLhsl(254, 55%, 35%)
HSVhsv(254, 71%, 55%)
CMYKcmyk(54.3%, 70.7%, 0%, 45.1%)
CIE-LABlab(25.47, 37.03, -51.43)
CIE-LCHlch(25.47, 63.38, 305.75°)
OKLaboklab(37.36% 0.0452 -0.1478)
OKLCHoklch(37.36% 0.155 287)
XYZxyz(7.6395, 4.5689, 25.2852)
Luminance0.0457 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40298C #758C29
analogous
#29448C #40298C #71298C
triadic
#40298C #8C4029 #298C40
tetradic
#40298C #8C2944 #758C29 #298C71
square
#40298C #8C2944 #758C29 #298C71
split-complementary
#40298C #8C7129 #448C29
monochromatic
#150D2D #2A1B5D #40298C #5637BB #795FD0

Accessibility & contrast

On white

10.97
#40298C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40298C
10.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40298C#FFFFFF#000000##FFFFFF
##40298C1.0010.971.9110.97
#FFFFFF10.971.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F8F
Deuteranopia (green-blind)
#003A8A
Tritanopia (blue-blind)
#224357
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40298c;
/* rgb */ color: rgb(64, 41, 140);
/* oklch */ color: oklch(37.4% 0.155 287.0);
Tailwind
colors: {
  custom: {
    50: '#7d65ae',
    500: '#40298c',
    950: '#000000',
  },
}
SCSS
$custom: #40298c;
$custom-light: #7d65ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40298c",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 140
  },
  "hsl": {
    "h": 253.939,
    "s": 54.696,
    "l": 35.49
  },
  "oklch": {
    "l": 0.3736,
    "c": 0.15454,
    "h": 287
  },
  "luminance": 0.04569
}

Semantic roles & 50–950 ramp

primary
#40298C
secondary
#A1B65B
accent
#DE4ABC
background
#F8F6FA
surface
#EFEBF4
border
#CAC6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40298C

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

Preview Lab → · Contrast checker → · Palette generator →

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