#40239E#40239E

#40239E is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.3% C 0.183 H 284.5°. Best body text is #FFFFFF at 10.76:1 contrast (WCAG AA passes).

Color values

HEX#40239E
RGBrgb(64, 35, 158)
HSLhsl(254, 64%, 38%)
HSVhsv(254, 78%, 62%)
CMYKcmyk(59.5%, 77.8%, 0%, 38%)
CIE-LABlab(26.04, 45.72, -61.58)
CIE-LCHlch(26.04, 76.69, 306.59°)
OKLaboklab(38.29% 0.0459 -0.1774)
OKLCHoklch(38.29% 0.183 284.5)
XYZxyz(8.8851, 4.7601, 32.7917)
Luminance0.0476 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40239E #819E23
analogous
#23449E #40239E #7D239E
triadic
#40239E #9E4023 #239E40
tetradic
#40239E #9E2344 #819E23 #239E7D
square
#40239E #9E2344 #819E23 #239E7D
split-complementary
#40239E #9E7D23 #449E23
monochromatic
#170D3A #2C186C #40239E #542ED0 #7D60DC

Accessibility & contrast

On white

10.76
#40239E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#40239E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40239E
10.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40239E#FFFFFF#000000##FFFFFF
##40239E1.0010.761.9510.76
#FFFFFF10.761.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0041A1
Deuteranopia (green-blind)
#003A9C
Tritanopia (blue-blind)
#064660
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #40239e;
/* rgb */ color: rgb(64, 35, 158);
/* oklch */ color: oklch(38.3% 0.183 284.5);
Tailwind
colors: {
  custom: {
    50: '#8162bc',
    500: '#40239e',
    950: '#000000',
  },
}
SCSS
$custom: #40239e;
$custom-light: #8162bc;
$custom-dark: #000000;
JSON
{
  "hex": "#40239e",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 158
  },
  "hsl": {
    "h": 254.146,
    "s": 63.731,
    "l": 37.843
  },
  "oklch": {
    "l": 0.38287,
    "c": 0.18327,
    "h": 284.5
  },
  "luminance": 0.04761
}

Semantic roles & 50–950 ramp

primary
#40239E
secondary
#A9C15C
accent
#E741C0
background
#F8F6FB
surface
#F0EBF7
border
#CBC6D0
text
#0B0512
muted
#7C7A81

Preview Lab

Preview with #40239E

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

Preview Lab → · Contrast checker → · Palette generator →

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