#40235E#40235E

#40235E is a dark, moderate violet. Relative luminance 0.031; OKLCH L 32.6% C 0.103 H 303.9°. Best body text is #FFFFFF at 12.96:1 contrast (WCAG AA passes).

Color values

HEX#40235E
RGBrgb(64, 35, 94)
HSLhsl(269, 46%, 25%)
HSVhsv(269, 63%, 37%)
CMYKcmyk(31.9%, 62.8%, 0%, 63.1%)
CIE-LABlab(20.44, 26.91, -30.14)
CIE-LCHlch(20.44, 40.40, 311.76°)
OKLaboklab(32.56% 0.0573 -0.0852)
OKLCHoklch(32.56% 0.103 303.9)
XYZxyz(4.7353, 3.1002, 10.9364)
Luminance0.0310 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40235E #415E23
analogous
#23235E #40235E #5D235E
triadic
#40235E #5E4023 #235E40
tetradic
#40235E #5E2323 #415E23 #235E5D
square
#40235E #5E2323 #415E23 #235E5D
split-complementary
#40235E #5E5D23 #235E23
monochromatic
#0F0816 #221231 #40235E #5E348B #7D44B7

Accessibility & contrast

On white

12.96
#40235E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#40235E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40235E
12.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40235E#FFFFFF#000000##FFFFFF
##40235E1.0012.961.6212.96
#FFFFFF12.961.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#083160
Deuteranopia (green-blind)
#16315D
Tritanopia (blue-blind)
#3B2F3C
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #40235e;
/* rgb */ color: rgb(64, 35, 94);
/* oklch */ color: oklch(32.6% 0.103 303.9);
Tailwind
colors: {
  custom: {
    50: '#775f8c',
    500: '#40235e',
    950: '#000000',
  },
}
SCSS
$custom: #40235e;
$custom-light: #775f8c;
$custom-dark: #000000;
JSON
{
  "hex": "#40235e",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 94
  },
  "hsl": {
    "h": 269.492,
    "s": 45.736,
    "l": 25.294
  },
  "oklch": {
    "l": 0.3256,
    "c": 0.10264,
    "h": 303.9
  },
  "luminance": 0.031
}

Semantic roles & 50–950 ramp

primary
#40235E
secondary
#6F924B
accent
#D55295
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09050C
muted
#7B797D

Preview Lab

Preview with #40235E

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

Preview Lab → · Contrast checker → · Palette generator →

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