#2D1778#2D1778

#2D1778 is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.0% C 0.151 H 283.6°. Best body text is #FFFFFF at 13.95:1 contrast (WCAG AA passes).

Color values

HEX#2D1778
RGBrgb(45, 23, 120)
HSLhsl(254, 68%, 28%)
HSVhsv(254, 81%, 47%)
CMYKcmyk(62.5%, 80.8%, 0%, 52.9%)
CIE-LABlab(18.04, 37.81, -51.08)
CIE-LCHlch(18.04, 63.56, 306.51°)
OKLaboklab(31.04% 0.0356 -0.1473)
OKLCHoklch(31.04% 0.152 283.6)
XYZxyz(4.7777, 2.5264, 18.0015)
Luminance0.0253 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D1778 #627817
analogous
#173278 #2D1778 #5D1778
triadic
#2D1778 #782D17 #17782D
tetradic
#2D1778 #781732 #627817 #17785D
square
#2D1778 #781732 #627817 #17785D
split-complementary
#2D1778 #785D17 #327817
monochromatic
#0A051A #1A0D45 #2D1778 #4021AB #5732D8

Accessibility & contrast

On white

13.95
#2D1778 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#2D1778 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D1778
13.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D1778#FFFFFF#000000##FFFFFF
##2D17781.0013.951.5113.95
#FFFFFF13.951.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7B
Deuteranopia (green-blind)
#002976
Tritanopia (blue-blind)
#003347
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2d1778;
/* rgb */ color: rgb(45, 23, 120);
/* oklch */ color: oklch(31.0% 0.151 283.6);
Tailwind
colors: {
  custom: {
    50: '#7157a0',
    500: '#2d1778',
    950: '#000000',
  },
}
SCSS
$custom: #2d1778;
$custom-light: #7157a0;
$custom-dark: #000000;
JSON
{
  "hex": "#2d1778",
  "rgb": {
    "r": 45,
    "g": 23,
    "b": 120
  },
  "hsl": {
    "h": 253.608,
    "s": 67.832,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31038,
    "c": 0.1515,
    "h": 283.6
  },
  "luminance": 0.02527
}

Semantic roles & 50–950 ramp

primary
#2D1778
secondary
#94AD3E
accent
#EB3DC3
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#08030F
muted
#7B787F

Preview Lab

Preview with #2D1778

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

Preview Lab → · Contrast checker → · Palette generator →

#2D1778 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva