#2C127E#2C127E

#2C127E is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.1% C 0.163 H 282.3°. Best body text is #FFFFFF at 14.05:1 contrast (WCAG AA passes).

Color values

HEX#2C127E
RGBrgb(44, 18, 126)
HSLhsl(254, 75%, 28%)
HSVhsv(254, 86%, 49%)
CMYKcmyk(65.1%, 85.7%, 0%, 50.6%)
CIE-LABlab(17.80, 41.90, -55.31)
CIE-LCHlch(17.80, 69.39, 307.14°)
OKLaboklab(31.05% 0.0348 -0.1595)
OKLCHoklch(31.05% 0.163 282.3)
XYZxyz(5.0197, 2.4741, 19.9476)
Luminance0.0247 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C127E #647E12
analogous
#122E7E #2C127E #62127E
triadic
#2C127E #7E2C12 #127E2C
tetradic
#2C127E #7E122E #647E12 #127E62
square
#2C127E #7E122E #647E12 #127E62
split-complementary
#2C127E #7E6212 #2E7E12
monochromatic
#09041B #190A48 #2C127E #3F1AB4 #562AE1

Accessibility & contrast

On white

14.05
#2C127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#2C127E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2C127E
14.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C127E#FFFFFF#000000##FFFFFF
##2C127E1.0014.051.4914.05
#FFFFFF14.051.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F81
Deuteranopia (green-blind)
#00287C
Tritanopia (blue-blind)
#00344A
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2c127e;
/* rgb */ color: rgb(44, 18, 126);
/* oklch */ color: oklch(31.1% 0.163 282.3);
Tailwind
colors: {
  custom: {
    50: '#7255a5',
    500: '#2c127e',
    950: '#000000',
  },
}
SCSS
$custom: #2c127e;
$custom-light: #7255a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2c127e",
  "rgb": {
    "r": 44,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 254.444,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31051,
    "c": 0.16331,
    "h": 282.3
  },
  "luminance": 0.02474
}

Semantic roles & 50–950 ramp

primary
#2C127E
secondary
#96B438
accent
#F236C4
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2C127E

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

Preview Lab → · Contrast checker → · Palette generator →

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