#2D127E#2D127E

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

Color values

HEX#2D127E
RGBrgb(45, 18, 126)
HSLhsl(255, 75%, 28%)
HSVhsv(255, 86%, 49%)
CMYKcmyk(64.3%, 85.7%, 0%, 50.6%)
CIE-LABlab(17.90, 42.00, -55.14)
CIE-LCHlch(17.90, 69.32, 307.30°)
OKLaboklab(31.15% 0.0365 -0.159)
OKLCHoklch(31.15% 0.163 282.9)
XYZxyz(5.0632, 2.4965, 19.9497)
Luminance0.0250 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D127E #637E12
analogous
#122D7E #2D127E #63127E
triadic
#2D127E #7E2D12 #127E2D
tetradic
#2D127E #7E122D #637E12 #127E63
square
#2D127E #7E122D #637E12 #127E63
split-complementary
#2D127E #7E6312 #2D7E12
monochromatic
#0A041B #1A0A48 #2D127E #401AB4 #582AE1

Accessibility & contrast

On white

14.01
#2D127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D127E
14.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D127E#FFFFFF#000000##FFFFFF
##2D127E1.0014.011.5014.01
#FFFFFF14.011.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.011.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: #2d127e;
/* rgb */ color: rgb(45, 18, 126);
/* oklch */ color: oklch(31.1% 0.163 282.9);
Tailwind
colors: {
  custom: {
    50: '#7255a5',
    500: '#2d127e',
    950: '#000000',
  },
}
SCSS
$custom: #2d127e;
$custom-light: #7255a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2d127e",
  "rgb": {
    "r": 45,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 255,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31146,
    "c": 0.16316,
    "h": 282.9
  },
  "luminance": 0.02497
}

Semantic roles & 50–950 ramp

primary
#2D127E
secondary
#95B438
accent
#F236C3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D127E

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

Preview Lab → · Contrast checker → · Palette generator →

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