#40296B#40296B

#40296B is a dark, moderate violet. Relative luminance 0.037; OKLCH L 34.6% C 0.110 H 296.2°. Best body text is #FFFFFF at 12.02:1 contrast (WCAG AA passes).

Color values

HEX#40296B
RGBrgb(64, 41, 107)
HSLhsl(261, 45%, 29%)
HSVhsv(261, 62%, 42%)
CMYKcmyk(40.2%, 61.7%, 0%, 58%)
CIE-LABlab(22.78, 26.93, -34.88)
CIE-LCHlch(22.78, 44.07, 307.67°)
OKLaboklab(34.57% 0.0488 -0.0991)
OKLCHoklch(34.57% 0.11 296.2)
XYZxyz(5.5604, 3.7373, 14.3355)
Luminance0.0374 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40296B #546B29
analogous
#29336B #40296B #61296B
triadic
#40296B #6B4029 #296B40
tetradic
#40296B #6B2933 #546B29 #296B61
square
#40296B #6B2933 #546B29 #296B61
split-complementary
#40296B #6B6129 #336B29
monochromatic
#0D0816 #26183F #40296B #5A3A97 #7752BD

Accessibility & contrast

On white

12.02
#40296B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#40296B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40296B
12.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40296B#FFFFFF#000000##FFFFFF
##40296B1.0012.021.7512.02
#FFFFFF12.021.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#03376D
Deuteranopia (green-blind)
#0E366A
Tritanopia (blue-blind)
#363745
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40296b;
/* rgb */ color: rgb(64, 41, 107);
/* oklch */ color: oklch(34.6% 0.110 296.2);
Tailwind
colors: {
  custom: {
    50: '#786496',
    500: '#40296b',
    950: '#000000',
  },
}
SCSS
$custom: #40296b;
$custom-light: #786496;
$custom-dark: #000000;
JSON
{
  "hex": "#40296b",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 107
  },
  "hsl": {
    "h": 260.909,
    "s": 44.595,
    "l": 29.02
  },
  "oklch": {
    "l": 0.34573,
    "c": 0.11046,
    "h": 296.2
  },
  "luminance": 0.03737
}

Semantic roles & 50–950 ramp

primary
#40296B
secondary
#839D52
accent
#D453A7
background
#F7F6F9
surface
#EDEBF2
border
#C8C6CC
text
#09050D
muted
#7B7A7E

Preview Lab

Preview with #40296B

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

Preview Lab → · Contrast checker → · Palette generator →

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