#40198D#40198D

#40198D is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.4% C 0.173 H 289.6°. Best body text is #FFFFFF at 12.06:1 contrast (WCAG AA passes).

Color values

HEX#40198D
RGBrgb(64, 25, 141)
HSLhsl(260, 70%, 33%)
HSVhsv(260, 82%, 55%)
CMYKcmyk(54.6%, 82.3%, 0%, 44.7%)
CIE-LABlab(22.68, 45.50, -56.63)
CIE-LCHlch(22.68, 72.64, 308.78°)
OKLaboklab(35.43% 0.0581 -0.1629)
OKLCHoklch(35.43% 0.173 289.6)
XYZxyz(7.2683, 3.7080, 25.5269)
Luminance0.0371 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40198D #668D19
analogous
#192C8D #40198D #7A198D
triadic
#40198D #8D4019 #198D40
tetradic
#40198D #8D192C #668D19 #198D7A
square
#40198D #8D192C #668D19 #198D7A
split-complementary
#40198D #8D7A19 #2C8D19
monochromatic
#110725 #281059 #40198D #5822C1 #7743DE

Accessibility & contrast

On white

12.06
#40198D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#40198D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40198D
12.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40198D#FFFFFF#000000##FFFFFF
##40198D1.0012.061.7412.06
#FFFFFF12.061.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003890
Deuteranopia (green-blind)
#00338B
Tritanopia (blue-blind)
#223B54
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40198d;
/* rgb */ color: rgb(64, 25, 141);
/* oklch */ color: oklch(35.4% 0.173 289.6);
Tailwind
colors: {
  custom: {
    50: '#7e5caf',
    500: '#40198d',
    950: '#000000',
  },
}
SCSS
$custom: #40198d;
$custom-light: #7e5caf;
$custom-dark: #000000;
JSON
{
  "hex": "#40198d",
  "rgb": {
    "r": 64,
    "g": 25,
    "b": 141
  },
  "hsl": {
    "h": 260.172,
    "s": 69.88,
    "l": 32.549
  },
  "oklch": {
    "l": 0.35426,
    "c": 0.17292,
    "h": 289.6
  },
  "luminance": 0.03708
}

Semantic roles & 50–950 ramp

primary
#40198D
secondary
#95BF43
accent
#ED3BB1
background
#F8F5FA
surface
#EFE9F5
border
#CAC5CF
text
#0B0411
muted
#7C7980

Preview Lab

Preview with #40198D

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

Preview Lab → · Contrast checker → · Palette generator →

#40198D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva