#2A1270#2A1270

#2A1270 is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.3% C 0.147 H 284.4°. Best body text is #FFFFFF at 14.80:1 contrast (WCAG AA passes).

Color values

HEX#2A1270
RGBrgb(42, 18, 112)
HSLhsl(255, 72%, 25%)
HSVhsv(255, 84%, 44%)
CMYKcmyk(62.5%, 83.9%, 0%, 56.1%)
CIE-LABlab(15.97, 37.46, -49.33)
CIE-LCHlch(15.97, 61.94, 307.21°)
OKLaboklab(29.26% 0.0366 -0.1422)
OKLCHoklch(29.26% 0.147 284.4)
XYZxyz(4.0949, 2.0944, 15.5146)
Luminance0.0209 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1270 #587012
analogous
#122970 #2A1270 #591270
triadic
#2A1270 #702A12 #12702A
tetradic
#2A1270 #701229 #587012 #127059
square
#2A1270 #701229 #587012 #127059
split-complementary
#2A1270 #705912 #297012
monochromatic
#0A041A #160A3B #2A1270 #3E1AA5 #5223D9

Accessibility & contrast

On white

14.80
#2A1270 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#2A1270 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1270
14.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1270#FFFFFF#000000##FFFFFF
##2A12701.0014.801.4214.80
#FFFFFF14.801.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A73
Deuteranopia (green-blind)
#00256E
Tritanopia (blue-blind)
#002E41
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2a1270;
/* rgb */ color: rgb(42, 18, 112);
/* oklch */ color: oklch(29.3% 0.147 284.4);
Tailwind
colors: {
  custom: {
    50: '#6e549a',
    500: '#2a1270',
    950: '#000000',
  },
}
SCSS
$custom: #2a1270;
$custom-light: #6e549a;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1270",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 112
  },
  "hsl": {
    "h": 255.319,
    "s": 72.308,
    "l": 25.49
  },
  "oklch": {
    "l": 0.29263,
    "c": 0.14681,
    "h": 284.4
  },
  "luminance": 0.02095
}

Semantic roles & 50–950 ramp

primary
#2A1270
secondary
#8AA737
accent
#EF39C0
background
#F7F5F9
surface
#EDE8F2
border
#C8C4CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1270

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

Preview Lab → · Contrast checker → · Palette generator →

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