#40299B#40299B

#40299B is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.8% C 0.173 H 284.1°. Best body text is #FFFFFF at 10.46:1 contrast (WCAG AA passes).

Color values

HEX#40299B
RGBrgb(64, 41, 155)
HSLhsl(252, 58%, 38%)
HSVhsv(252, 74%, 61%)
CMYKcmyk(58.7%, 73.5%, 0%, 39.2%)
CIE-LABlab(26.85, 41.67, -58.41)
CIE-LCHlch(26.85, 71.75, 305.50°)
OKLaboklab(38.77% 0.0422 -0.1682)
OKLCHoklch(38.77% 0.173 284.1)
XYZxyz(8.8219, 5.0419, 31.5123)
Luminance0.0504 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40299B #849B29
analogous
#294B9B #40299B #79299B
triadic
#40299B #9B4029 #299B40
tetradic
#40299B #9B294B #849B29 #299B79
square
#40299B #9B294B #849B29 #299B79
split-complementary
#40299B #9B7929 #4B9B29
monochromatic
#180F3A #2C1C6B #40299B #5537CA #7E67D7

Accessibility & contrast

On white

10.46
#40299B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#40299B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40299B
10.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40299B#FFFFFF#000000##FFFFFF
##40299B1.0010.462.0110.46
#FFFFFF10.461.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439E
Deuteranopia (green-blind)
#003C99
Tritanopia (blue-blind)
#0D485F
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #40299b;
/* rgb */ color: rgb(64, 41, 155);
/* oklch */ color: oklch(38.8% 0.173 284.1);
Tailwind
colors: {
  custom: {
    50: '#8065ba',
    500: '#40299b',
    950: '#000000',
  },
}
SCSS
$custom: #40299b;
$custom-light: #8065ba;
$custom-dark: #000000;
JSON
{
  "hex": "#40299b",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 155
  },
  "hsl": {
    "h": 252.105,
    "s": 58.163,
    "l": 38.431
  },
  "oklch": {
    "l": 0.38771,
    "c": 0.17342,
    "h": 284.1
  },
  "luminance": 0.05042
}

Semantic roles & 50–950 ramp

primary
#40299B
secondary
#ABBD63
accent
#E146C2
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #40299B

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

Preview Lab → · Contrast checker → · Palette generator →

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