#40236F#40236F

#40236F is a dark, vivid violet. Relative luminance 0.034; OKLCH L 33.9% C 0.125 H 296.7°. Best body text is #FFFFFF at 12.44:1 contrast (WCAG AA passes).

Color values

HEX#40236F
RGBrgb(64, 35, 111)
HSLhsl(263, 52%, 29%)
HSVhsv(263, 68%, 44%)
CMYKcmyk(42.3%, 68.5%, 0%, 56.5%)
CIE-LABlab(21.72, 31.77, -39.17)
CIE-LCHlch(21.72, 50.43, 309.04°)
OKLaboklab(33.9% 0.0562 -0.1117)
OKLCHoklch(33.9% 0.125 296.7)
XYZxyz(5.5839, 3.4396, 15.4056)
Luminance0.0344 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40236F #526F23
analogous
#232C6F #40236F #66236F
triadic
#40236F #6F4023 #236F40
tetradic
#40236F #6F232C #526F23 #236F66
square
#40236F #6F232C #526F23 #236F66
split-complementary
#40236F #6F6623 #2C6F23
monochromatic
#0D0717 #251440 #40236F #5B329E #7747C5

Accessibility & contrast

On white

12.44
#40236F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#40236F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40236F
12.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40236F#FFFFFF#000000##FFFFFF
##40236F1.0012.441.6912.44
#FFFFFF12.441.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003471
Deuteranopia (green-blind)
#00336D
Tritanopia (blue-blind)
#343545
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #40236f;
/* rgb */ color: rgb(64, 35, 111);
/* oklch */ color: oklch(33.9% 0.125 296.7);
Tailwind
colors: {
  custom: {
    50: '#796099',
    500: '#40236f',
    950: '#000000',
  },
}
SCSS
$custom: #40236f;
$custom-light: #796099;
$custom-dark: #000000;
JSON
{
  "hex": "#40236f",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 111
  },
  "hsl": {
    "h": 262.895,
    "s": 52.055,
    "l": 28.627
  },
  "oklch": {
    "l": 0.33901,
    "c": 0.12505,
    "h": 296.7
  },
  "luminance": 0.0344
}

Semantic roles & 50–950 ramp

primary
#40236F
secondary
#81A24C
accent
#DB4CA5
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#09050E
muted
#7B797E

Preview Lab

Preview with #40236F

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

Preview Lab → · Contrast checker → · Palette generator →

#40236F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva