#40239B#40239B

#40239B is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.0% C 0.180 H 285.1°. Best body text is #FFFFFF at 10.87:1 contrast (WCAG AA passes).

Color values

HEX#40239B
RGBrgb(64, 35, 155)
HSLhsl(255, 63%, 37%)
HSVhsv(255, 77%, 61%)
CMYKcmyk(58.7%, 77.4%, 0%, 39.2%)
CIE-LABlab(25.74, 44.83, -60.24)
CIE-LCHlch(25.74, 75.09, 306.65°)
OKLaboklab(37.98% 0.0467 -0.1735)
OKLCHoklch(37.98% 0.18 285.1)
XYZxyz(8.6300, 4.6581, 31.4483)
Luminance0.0466 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40239B #7E9B23
analogous
#23429B #40239B #7C239B
triadic
#40239B #9B4023 #239B40
tetradic
#40239B #9B2342 #7E9B23 #239B7C
square
#40239B #9B2342 #7E9B23 #239B7C
split-complementary
#40239B #9B7C23 #429B23
monochromatic
#170C37 #2B1869 #40239B #552ECD #7C5EDB

Accessibility & contrast

On white

10.87
#40239B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#40239B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40239B
10.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40239B#FFFFFF#000000##FFFFFF
##40239B1.0010.871.9310.87
#FFFFFF10.871.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00409E
Deuteranopia (green-blind)
#003999
Tritanopia (blue-blind)
#0E455E
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40239b;
/* rgb */ color: rgb(64, 35, 155);
/* oklch */ color: oklch(38.0% 0.180 285.1);
Tailwind
colors: {
  custom: {
    50: '#8062ba',
    500: '#40239b',
    950: '#000000',
  },
}
SCSS
$custom: #40239b;
$custom-light: #8062ba;
$custom-dark: #000000;
JSON
{
  "hex": "#40239b",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 155
  },
  "hsl": {
    "h": 254.5,
    "s": 63.158,
    "l": 37.255
  },
  "oklch": {
    "l": 0.37984,
    "c": 0.17971,
    "h": 285.1
  },
  "luminance": 0.04659
}

Semantic roles & 50–950 ramp

primary
#40239B
secondary
#A7BF5A
accent
#E642BE
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40239B

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

Preview Lab → · Contrast checker → · Palette generator →

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