#2A127C#2A127C

#2A127C is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.6% C 0.161 H 281.5°. Best body text is #FFFFFF at 14.23:1 contrast (WCAG AA passes).

Color values

HEX#2A127C
RGBrgb(42, 18, 124)
HSLhsl(254, 75%, 28%)
HSVhsv(254, 85%, 49%)
CMYKcmyk(66.1%, 85.5%, 0%, 51.4%)
CIE-LABlab(17.37, 41.10, -54.76)
CIE-LCHlch(17.37, 68.47, 306.89°)
OKLaboklab(30.63% 0.0323 -0.158)
OKLCHoklch(30.63% 0.161 281.5)
XYZxyz(4.8081, 2.3797, 19.2708)
Luminance0.0238 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A127C #647C12
analogous
#122F7C #2A127C #5F127C
triadic
#2A127C #7C2A12 #127C2A
tetradic
#2A127C #7C122F #647C12 #127C5F
square
#2A127C #7C122F #647C12 #127C5F
split-complementary
#2A127C #7C5F12 #2F7C12
monochromatic
#09041B #180A47 #2A127C #3C1AB1 #5229E0

Accessibility & contrast

On white

14.23
#2A127C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#2A127C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A127C
14.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A127C#FFFFFF#000000##FFFFFF
##2A127C1.0014.231.4814.23
#FFFFFF14.231.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E7F
Deuteranopia (green-blind)
#00277A
Tritanopia (blue-blind)
#003348
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #2a127c;
/* rgb */ color: rgb(42, 18, 124);
/* oklch */ color: oklch(30.6% 0.161 281.5);
Tailwind
colors: {
  custom: {
    50: '#7055a3',
    500: '#2a127c',
    950: '#000000',
  },
}
SCSS
$custom: #2a127c;
$custom-light: #7055a3;
$custom-dark: #000000;
JSON
{
  "hex": "#2a127c",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 124
  },
  "hsl": {
    "h": 253.585,
    "s": 74.648,
    "l": 27.843
  },
  "oklch": {
    "l": 0.30634,
    "c": 0.16128,
    "h": 281.5
  },
  "luminance": 0.0238
}

Semantic roles & 50–950 ramp

primary
#2A127C
secondary
#96B238
accent
#F137C7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A127C

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

Preview Lab → · Contrast checker → · Palette generator →

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