#40145B#40145B

#40145B is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.2% C 0.122 H 309.1°. Best body text is #FFFFFF at 14.29:1 contrast (WCAG AA passes).

Color values

HEX#40145B
RGBrgb(64, 20, 91)
HSLhsl(277, 64%, 22%)
HSVhsv(277, 78%, 36%)
CMYKcmyk(29.7%, 78%, 0%, 64.3%)
CIE-LABlab(17.21, 34.37, -33.36)
CIE-LCHlch(17.21, 47.90, 315.86°)
OKLaboklab(30.16% 0.0769 -0.0945)
OKLCHoklch(30.16% 0.122 309.1)
XYZxyz(4.2525, 2.3457, 10.1243)
Luminance0.0235 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40145B #2F5B14
analogous
#1D145B #40145B #5B1453
triadic
#40145B #5B4014 #145B40
tetradic
#40145B #5B1D14 #2F5B14 #14535B
square
#40145B #5B1D14 #2F5B14 #14535B
split-complementary
#40145B #535B14 #145B1D
monochromatic
#120619 #1D0929 #40145B #631F8D #872ABF

Accessibility & contrast

On white

14.29
#40145B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#40145B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40145B
14.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40145B#FFFFFF#000000##FFFFFF
##40145B1.0014.291.4714.29
#FFFFFF14.291.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00295D
Deuteranopia (green-blind)
#032B59
Tritanopia (blue-blind)
#3C2436
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #40145b;
/* rgb */ color: rgb(64, 20, 91);
/* oklch */ color: oklch(30.2% 0.122 309.1);
Tailwind
colors: {
  custom: {
    50: '#78568a',
    500: '#40145b',
    950: '#000000',
  },
}
SCSS
$custom: #40145b;
$custom-light: #78568a;
$custom-dark: #000000;
JSON
{
  "hex": "#40145b",
  "rgb": {
    "r": 64,
    "g": 20,
    "b": 91
  },
  "hsl": {
    "h": 277.183,
    "s": 63.964,
    "l": 21.765
  },
  "oklch": {
    "l": 0.30157,
    "c": 0.12188,
    "h": 309.1
  },
  "luminance": 0.02346
}

Semantic roles & 50–950 ramp

primary
#40145B
secondary
#5B9338
accent
#E74180
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40145B

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

Preview Lab → · Contrast checker → · Palette generator →

#40145B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva