#40146C#40146C

#40146C is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.7% C 0.141 H 301.2°. Best body text is #FFFFFF at 13.68:1 contrast (WCAG AA passes).

Color values

HEX#40146C
RGBrgb(64, 20, 108)
HSLhsl(270, 69%, 25%)
HSVhsv(270, 81%, 42%)
CMYKcmyk(40.7%, 81.5%, 0%, 57.6%)
CIE-LABlab(18.68, 38.73, -42.18)
CIE-LCHlch(18.68, 57.26, 312.56°)
OKLaboklab(31.66% 0.0728 -0.1205)
OKLCHoklch(31.66% 0.141 301.2)
XYZxyz(5.0706, 2.6730, 14.4332)
Luminance0.0267 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40146C #406C14
analogous
#14146C #40146C #6C146C
triadic
#40146C #6C4014 #146C40
tetradic
#40146C #6C1414 #406C14 #146C6C
square
#40146C #6C1414 #406C14 #146C6C
split-complementary
#40146C #6C6C14 #146C14
monochromatic
#0F051A #210A38 #40146C #5F1EA0 #7D27D3

Accessibility & contrast

On white

13.68
#40146C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#40146C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40146C
13.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40146C#FFFFFF#000000##FFFFFF
##40146C1.0013.681.5313.68
#FFFFFF13.681.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D6E
Deuteranopia (green-blind)
#002D6A
Tritanopia (blue-blind)
#362B40
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #40146c;
/* rgb */ color: rgb(64, 20, 108);
/* oklch */ color: oklch(31.7% 0.141 301.2);
Tailwind
colors: {
  custom: {
    50: '#7a5797',
    500: '#40146c',
    950: '#000000',
  },
}
SCSS
$custom: #40146c;
$custom-light: #7a5797;
$custom-dark: #000000;
JSON
{
  "hex": "#40146c",
  "rgb": {
    "r": 64,
    "g": 20,
    "b": 108
  },
  "hsl": {
    "h": 270,
    "s": 68.75,
    "l": 25.098
  },
  "oklch": {
    "l": 0.31659,
    "c": 0.14078,
    "h": 301.2
  },
  "luminance": 0.02673
}

Semantic roles & 50–950 ramp

primary
#40146C
secondary
#6EA339
accent
#EC3C94
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030D
muted
#7C787E

Preview Lab

Preview with #40146C

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

Preview Lab → · Contrast checker → · Palette generator →

#40146C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva