#40237D#40237D

#40237D is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.1% C 0.143 H 292.2°. Best body text is #FFFFFF at 11.97:1 contrast (WCAG AA passes).

Color values

HEX#40237D
RGBrgb(64, 35, 125)
HSLhsl(259, 56%, 31%)
HSVhsv(259, 72%, 49%)
CMYKcmyk(48.8%, 72%, 0%, 51%)
CIE-LABlab(22.90, 35.89, -46.21)
CIE-LCHlch(22.90, 58.51, 307.84°)
OKLaboklab(35.12% 0.054 -0.1324)
OKLCHoklch(35.12% 0.143 292.2)
XYZxyz(6.4160, 3.7725, 19.7882)
Luminance0.0377 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40237D #607D23
analogous
#23337D #40237D #6D237D
triadic
#40237D #7D4023 #237D40
tetradic
#40237D #7D2333 #607D23 #237D6D
square
#40237D #7D2333 #607D23 #237D6D
split-complementary
#40237D #7D6D23 #337D23
monochromatic
#0F081D #28164D #40237D #5830AD #764DCD

Accessibility & contrast

On white

11.97
#40237D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#40237D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40237D
11.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40237D#FFFFFF#000000##FFFFFF
##40237D1.0011.971.7511.97
#FFFFFF11.971.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF11.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003880
Deuteranopia (green-blind)
#00357B
Tritanopia (blue-blind)
#2D3A4D
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #40237d;
/* rgb */ color: rgb(64, 35, 125);
/* oklch */ color: oklch(35.1% 0.143 292.2);
Tailwind
colors: {
  custom: {
    50: '#7b60a3',
    500: '#40237d',
    950: '#000000',
  },
}
SCSS
$custom: #40237d;
$custom-light: #7b60a3;
$custom-dark: #000000;
JSON
{
  "hex": "#40237d",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 125
  },
  "hsl": {
    "h": 259.333,
    "s": 56.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.35116,
    "c": 0.14299,
    "h": 292.2
  },
  "luminance": 0.03773
}

Semantic roles & 50–950 ramp

primary
#40237D
secondary
#90AF4C
accent
#E048AF
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40237D

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

Preview Lab → · Contrast checker → · Palette generator →

#40237D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva