#2C127F#2C127F

#2C127F is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.2% C 0.164 H 282.1°. Best body text is #FFFFFF at 14.00:1 contrast (WCAG AA passes).

Color values

HEX#2C127F
RGBrgb(44, 18, 127)
HSLhsl(254, 75%, 28%)
HSVhsv(254, 86%, 50%)
CMYKcmyk(65.4%, 85.8%, 0%, 50.2%)
CIE-LABlab(17.92, 42.20, -55.75)
CIE-LCHlch(17.92, 69.92, 307.12°)
OKLaboklab(31.17% 0.0345 -0.1608)
OKLCHoklch(31.17% 0.164 282.1)
XYZxyz(5.0846, 2.5000, 20.2892)
Luminance0.0250 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C127F #657F12
analogous
#122E7F #2C127F #62127F
triadic
#2C127F #7F2C12 #127F2C
tetradic
#2C127F #7F122E #657F12 #127F62
square
#2C127F #7F122E #657F12 #127F62
split-complementary
#2C127F #7F6212 #2E7F12
monochromatic
#09041B #190A49 #2C127F #3F1AB5 #562BE1

Accessibility & contrast

On white

14.00
#2C127F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#2C127F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2C127F
14.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C127F#FFFFFF#000000##FFFFFF
##2C127F1.0014.001.5014.00
#FFFFFF14.001.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F82
Deuteranopia (green-blind)
#00287D
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2c127f;
/* rgb */ color: rgb(44, 18, 127);
/* oklch */ color: oklch(31.2% 0.164 282.1);
Tailwind
colors: {
  custom: {
    50: '#7255a5',
    500: '#2c127f',
    950: '#000000',
  },
}
SCSS
$custom: #2c127f;
$custom-light: #7255a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2c127f",
  "rgb": {
    "r": 44,
    "g": 18,
    "b": 127
  },
  "hsl": {
    "h": 254.312,
    "s": 75.172,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31167,
    "c": 0.16449,
    "h": 282.1
  },
  "luminance": 0.025
}

Semantic roles & 50–950 ramp

primary
#2C127F
secondary
#97B538
accent
#F236C5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2C127F

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

Preview Lab → · Contrast checker → · Palette generator →

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