#2D127F#2D127F

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

Color values

HEX#2D127F
RGBrgb(45, 18, 127)
HSLhsl(255, 75%, 28%)
HSVhsv(255, 86%, 50%)
CMYKcmyk(64.6%, 85.8%, 0%, 50.2%)
CIE-LABlab(18.02, 42.30, -55.58)
CIE-LCHlch(18.02, 69.85, 307.27°)
OKLaboklab(31.26% 0.0361 -0.1603)
OKLCHoklch(31.26% 0.164 282.7)
XYZxyz(5.1281, 2.5224, 20.2912)
Luminance0.0252 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D127F #647F12
analogous
#122E7F #2D127F #63127F
triadic
#2D127F #7F2D12 #127F2D
tetradic
#2D127F #7F122E #647F12 #127F63
square
#2D127F #7F122E #647F12 #127F63
split-complementary
#2D127F #7F6312 #2E7F12
monochromatic
#09041B #1A0A49 #2D127F #401AB5 #582BE1

Accessibility & contrast

On white

13.96
#2D127F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D127F
13.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D127F#FFFFFF#000000##FFFFFF
##2D127F1.0013.961.5013.96
#FFFFFF13.961.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF13.961.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2d127f;
/* rgb */ color: rgb(45, 18, 127);
/* oklch */ color: oklch(31.3% 0.164 282.7);
Tailwind
colors: {
  custom: {
    50: '#7255a5',
    500: '#2d127f',
    950: '#000000',
  },
}
SCSS
$custom: #2d127f;
$custom-light: #7255a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2d127f",
  "rgb": {
    "r": 45,
    "g": 18,
    "b": 127
  },
  "hsl": {
    "h": 254.862,
    "s": 75.172,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31261,
    "c": 0.16433,
    "h": 282.7
  },
  "luminance": 0.02523
}

Semantic roles & 50–950 ramp

primary
#2D127F
secondary
#96B538
accent
#F236C3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D127F

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

Preview Lab → · Contrast checker → · Palette generator →

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