#40236A#40236A

#40236A is a dark, moderate violet. Relative luminance 0.033; OKLCH L 33.5% C 0.119 H 298.6°. Best body text is #FFFFFF at 12.60:1 contrast (WCAG AA passes).

Color values

HEX#40236A
RGBrgb(64, 35, 106)
HSLhsl(265, 50%, 28%)
HSVhsv(265, 67%, 42%)
CMYKcmyk(39.6%, 67%, 0%, 58.4%)
CIE-LABlab(21.33, 30.31, -36.57)
CIE-LCHlch(21.33, 47.50, 309.65°)
OKLaboklab(33.49% 0.0567 -0.1041)
OKLCHoklch(33.49% 0.119 298.6)
XYZxyz(5.3163, 3.3326, 13.9960)
Luminance0.0333 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40236A #4D6A23
analogous
#23296A #40236A #63236A
triadic
#40236A #6A4023 #236A40
tetradic
#40236A #6A2329 #4D6A23 #236A63
square
#40236A #6A2329 #4D6A23 #236A63
split-complementary
#40236A #6A6323 #296A23
monochromatic
#0E0817 #24143C #40236A #5C3298 #7846C2

Accessibility & contrast

On white

12.60
#40236A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#40236A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40236A
12.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40236A#FFFFFF#000000##FFFFFF
##40236A1.0012.601.6712.60
#FFFFFF12.601.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00336C
Deuteranopia (green-blind)
#013268
Tritanopia (blue-blind)
#363343
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #40236a;
/* rgb */ color: rgb(64, 35, 106);
/* oklch */ color: oklch(33.5% 0.119 298.6);
Tailwind
colors: {
  custom: {
    50: '#786095',
    500: '#40236a',
    950: '#000000',
  },
}
SCSS
$custom: #40236a;
$custom-light: #786095;
$custom-dark: #000000;
JSON
{
  "hex": "#40236a",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 106
  },
  "hsl": {
    "h": 264.507,
    "s": 50.355,
    "l": 27.647
  },
  "oklch": {
    "l": 0.3349,
    "c": 0.11853,
    "h": 298.6
  },
  "luminance": 0.03333
}

Semantic roles & 50–950 ramp

primary
#40236A
secondary
#7C9D4B
accent
#DA4EA1
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#09050D
muted
#7B797E

Preview Lab

Preview with #40236A

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

Preview Lab → · Contrast checker → · Palette generator →

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