#40239C#40239C

#40239C is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.1% C 0.181 H 284.9°. Best body text is #FFFFFF at 10.83:1 contrast (WCAG AA passes).

Color values

HEX#40239C
RGBrgb(64, 35, 156)
HSLhsl(254, 63%, 37%)
HSVhsv(254, 78%, 61%)
CMYKcmyk(59%, 77.6%, 0%, 38.8%)
CIE-LABlab(25.84, 45.12, -60.69)
CIE-LCHlch(25.84, 75.63, 306.63°)
OKLaboklab(38.09% 0.0465 -0.1748)
OKLCHoklch(38.09% 0.181 284.9)
XYZxyz(8.7143, 4.6918, 31.8925)
Luminance0.0469 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40239C #7F9C23
analogous
#23439C #40239C #7C239C
triadic
#40239C #9C4023 #239C40
tetradic
#40239C #9C2343 #7F9C23 #239C7C
square
#40239C #9C2343 #7F9C23 #239C7C
split-complementary
#40239C #9C7C23 #439C23
monochromatic
#170D38 #2B186A #40239C #552ECE #7C5EDB

Accessibility & contrast

On white

10.83
#40239C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#40239C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40239C
10.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40239C#FFFFFF#000000##FFFFFF
##40239C1.0010.831.9410.83
#FFFFFF10.831.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419F
Deuteranopia (green-blind)
#00399A
Tritanopia (blue-blind)
#0C465E
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40239c;
/* rgb */ color: rgb(64, 35, 156);
/* oklch */ color: oklch(38.1% 0.181 284.9);
Tailwind
colors: {
  custom: {
    50: '#8062ba',
    500: '#40239c',
    950: '#000000',
  },
}
SCSS
$custom: #40239c;
$custom-light: #8062ba;
$custom-dark: #000000;
JSON
{
  "hex": "#40239c",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 156
  },
  "hsl": {
    "h": 254.38,
    "s": 63.351,
    "l": 37.451
  },
  "oklch": {
    "l": 0.38085,
    "c": 0.18091,
    "h": 284.9
  },
  "luminance": 0.04692
}

Semantic roles & 50–950 ramp

primary
#40239C
secondary
#A8C05B
accent
#E641BF
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40239C

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

Preview Lab → · Contrast checker → · Palette generator →

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