#2D1270#2D1270

#2D1270 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.6% C 0.146 H 286.5°. Best body text is #FFFFFF at 14.66:1 contrast (WCAG AA passes).

Color values

HEX#2D1270
RGBrgb(45, 18, 112)
HSLhsl(257, 72%, 25%)
HSVhsv(257, 84%, 44%)
CMYKcmyk(59.8%, 83.9%, 0%, 56.1%)
CIE-LABlab(16.31, 37.83, -48.77)
CIE-LCHlch(16.31, 61.73, 307.80°)
OKLaboklab(29.57% 0.0416 -0.1405)
OKLCHoklch(29.57% 0.146 286.5)
XYZxyz(4.2222, 2.1601, 15.5205)
Luminance0.0216 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D1270 #557012
analogous
#122670 #2D1270 #5C1270
triadic
#2D1270 #702D12 #12702D
tetradic
#2D1270 #701226 #557012 #12705C
square
#2D1270 #701226 #557012 #12705C
split-complementary
#2D1270 #705C12 #267012
monochromatic
#0B041A #180A3B #2D1270 #421AA5 #5723D9

Accessibility & contrast

On white

14.66
#2D1270 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#2D1270 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D1270
14.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D1270#FFFFFF#000000##FFFFFF
##2D12701.0014.661.4314.66
#FFFFFF14.661.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B73
Deuteranopia (green-blind)
#00266E
Tritanopia (blue-blind)
#0C2E41
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2d1270;
/* rgb */ color: rgb(45, 18, 112);
/* oklch */ color: oklch(29.6% 0.146 286.5);
Tailwind
colors: {
  custom: {
    50: '#6f549a',
    500: '#2d1270',
    950: '#000000',
  },
}
SCSS
$custom: #2d1270;
$custom-light: #6f549a;
$custom-dark: #000000;
JSON
{
  "hex": "#2d1270",
  "rgb": {
    "r": 45,
    "g": 18,
    "b": 112
  },
  "hsl": {
    "h": 257.234,
    "s": 72.308,
    "l": 25.49
  },
  "oklch": {
    "l": 0.29571,
    "c": 0.14649,
    "h": 286.5
  },
  "luminance": 0.0216
}

Semantic roles & 50–950 ramp

primary
#2D1270
secondary
#87A737
accent
#EF39BB
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2D1270

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

Preview Lab → · Contrast checker → · Palette generator →

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