#40276F#40276F

#40276F is a dark, moderate violet. Relative luminance 0.037; OKLCH L 34.5% C 0.119 H 295.5°. Best body text is #FFFFFF at 12.08:1 contrast (WCAG AA passes).

Color values

HEX#40276F
RGBrgb(64, 39, 111)
HSLhsl(261, 48%, 29%)
HSVhsv(261, 65%, 44%)
CMYKcmyk(42.3%, 64.9%, 0%, 56.5%)
CIE-LABlab(22.61, 29.37, -37.73)
CIE-LCHlch(22.61, 47.82, 307.89°)
OKLaboklab(34.54% 0.0512 -0.1075)
OKLCHoklch(34.54% 0.119 295.5)
XYZxyz(5.7084, 3.6886, 15.4471)
Luminance0.0369 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40276F #566F27
analogous
#27326F #40276F #64276F
triadic
#40276F #6F4027 #276F40
tetradic
#40276F #6F2732 #566F27 #276F64
square
#40276F #6F2732 #566F27 #276F64
split-complementary
#40276F #6F6427 #326F27
monochromatic
#0D0817 #261742 #40276F #5A379C #774FC1

Accessibility & contrast

On white

12.08
#40276F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#40276F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40276F
12.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40276F#FFFFFF#000000##FFFFFF
##40276F1.0012.081.7412.08
#FFFFFF12.081.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003771
Deuteranopia (green-blind)
#00356D
Tritanopia (blue-blind)
#343747
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40276f;
/* rgb */ color: rgb(64, 39, 111);
/* oklch */ color: oklch(34.5% 0.119 295.5);
Tailwind
colors: {
  custom: {
    50: '#796299',
    500: '#40276f',
    950: '#000000',
  },
}
SCSS
$custom: #40276f;
$custom-light: #796299;
$custom-dark: #000000;
JSON
{
  "hex": "#40276f",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 111
  },
  "hsl": {
    "h": 260.833,
    "s": 48,
    "l": 29.412
  },
  "oklch": {
    "l": 0.34544,
    "c": 0.11908,
    "h": 295.5
  },
  "luminance": 0.03689
}

Semantic roles & 50–950 ramp

primary
#40276F
secondary
#85A250
accent
#D850A9
background
#F7F5F9
surface
#EEEAF2
border
#C9C6CC
text
#09050E
muted
#7B797E

Preview Lab

Preview with #40276F

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

Preview Lab → · Contrast checker → · Palette generator →

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