#40235A#40235A

#40235A is a dark, moderate violet. Relative luminance 0.030; OKLCH L 32.3% C 0.097 H 306.0°. Best body text is #FFFFFF at 13.08:1 contrast (WCAG AA passes).

Color values

HEX#40235A
RGBrgb(64, 35, 90)
HSLhsl(272, 44%, 25%)
HSVhsv(272, 61%, 35%)
CMYKcmyk(28.9%, 61.1%, 0%, 64.7%)
CIE-LABlab(20.16, 25.81, -27.93)
CIE-LCHlch(20.16, 38.03, 312.74°)
OKLaboklab(32.27% 0.0572 -0.0787)
OKLCHoklch(32.27% 0.097 306)
XYZxyz(4.5605, 3.0303, 10.0155)
Luminance0.0303 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40235A #3D5A23
analogous
#24235A #40235A #5A2359
triadic
#40235A #5A4023 #235A40
tetradic
#40235A #5A2423 #3D5A23 #23595A
square
#40235A #5A2423 #3D5A23 #23595A
split-complementary
#40235A #595A23 #235A24
monochromatic
#100916 #21122E #40235A #5F3486 #7F45B2

Accessibility & contrast

On white

13.08
#40235A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#40235A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40235A
13.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40235A#FFFFFF#000000##FFFFFF
##40235A1.0013.081.6113.08
#FFFFFF13.081.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0E305C
Deuteranopia (green-blind)
#193159
Tritanopia (blue-blind)
#3C2D3A
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #40235a;
/* rgb */ color: rgb(64, 35, 90);
/* oklch */ color: oklch(32.3% 0.097 306.0);
Tailwind
colors: {
  custom: {
    50: '#775f89',
    500: '#40235a',
    950: '#000000',
  },
}
SCSS
$custom: #40235a;
$custom-light: #775f89;
$custom-dark: #000000;
JSON
{
  "hex": "#40235a",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 90
  },
  "hsl": {
    "h": 271.636,
    "s": 44,
    "l": 24.51
  },
  "oklch": {
    "l": 0.32269,
    "c": 0.09729,
    "h": 306
  },
  "luminance": 0.0303
}

Semantic roles & 50–950 ramp

primary
#40235A
secondary
#6B8E4B
accent
#D45490
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09040B
muted
#7B797C

Preview Lab

Preview with #40235A

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

Preview Lab → · Contrast checker → · Palette generator →

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