#40195F#40195F

#40195F is a dark, moderate violet. Relative luminance 0.026; OKLCH L 31.1% C 0.120 H 306.1°. Best body text is #FFFFFF at 13.80:1 contrast (WCAG AA passes).

Color values

HEX#40195F
RGBrgb(64, 25, 95)
HSLhsl(273, 58%, 24%)
HSVhsv(273, 74%, 37%)
CMYKcmyk(32.6%, 73.7%, 0%, 62.7%)
CIE-LABlab(18.42, 32.90, -34.06)
CIE-LCHlch(18.42, 47.36, 314.01°)
OKLaboklab(31.12% 0.0705 -0.0967)
OKLCHoklch(31.12% 0.12 306.1)
XYZxyz(4.5271, 2.6115, 11.0898)
Luminance0.0261 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40195F #385F19
analogous
#1D195F #40195F #5F195B
triadic
#40195F #5F4019 #195F40
tetradic
#40195F #5F1D19 #385F19 #195B5F
square
#40195F #5F1D19 #385F19 #195B5F
split-complementary
#40195F #5B5F19 #195F1D
monochromatic
#100618 #1F0C2F #40195F #61268F #8132C0

Accessibility & contrast

On white

13.80
#40195F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#40195F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40195F
13.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40195F#FFFFFF#000000##FFFFFF
##40195F1.0013.801.5213.80
#FFFFFF13.801.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C61
Deuteranopia (green-blind)
#042D5D
Tritanopia (blue-blind)
#3B293A
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #40195f;
/* rgb */ color: rgb(64, 25, 95);
/* oklch */ color: oklch(31.1% 0.120 306.1);
Tailwind
colors: {
  custom: {
    50: '#78598d',
    500: '#40195f',
    950: '#000000',
  },
}
SCSS
$custom: #40195f;
$custom-light: #78598d;
$custom-dark: #000000;
JSON
{
  "hex": "#40195f",
  "rgb": {
    "r": 64,
    "g": 25,
    "b": 95
  },
  "hsl": {
    "h": 273.429,
    "s": 58.333,
    "l": 23.529
  },
  "oklch": {
    "l": 0.3112,
    "c": 0.11961,
    "h": 306.1
  },
  "luminance": 0.02611
}

Semantic roles & 50–950 ramp

primary
#40195F
secondary
#65953F
accent
#E2468B
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09040C
muted
#7B797D

Preview Lab

Preview with #40195F

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

Preview Lab → · Contrast checker → · Palette generator →

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