#2D128F#2D128F

#2D128F is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.1% C 0.183 H 279.5°. Best body text is #FFFFFF at 13.17:1 contrast (WCAG AA passes).

Color values

HEX#2D128F
RGBrgb(45, 18, 143)
HSLhsl(253, 78%, 32%)
HSVhsv(253, 87%, 56%)
CMYKcmyk(68.5%, 87.4%, 0%, 43.9%)
CIE-LABlab(19.94, 46.97, -62.48)
CIE-LCHlch(19.94, 78.17, 306.93°)
OKLaboklab(33.13% 0.0302 -0.1804)
OKLCHoklch(33.13% 0.183 279.5)
XYZxyz(6.2548, 2.9731, 26.2255)
Luminance0.0297 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D128F #748F12
analogous
#12368F #2D128F #6C128F
triadic
#2D128F #8F2D12 #128F2D
tetradic
#2D128F #8F1236 #748F12 #128F6C
square
#2D128F #8F1236 #748F12 #128F6C
split-complementary
#2D128F #8F6C12 #368F12
monochromatic
#0B0422 #1C0B59 #2D128F #3E19C5 #5C36E6

Accessibility & contrast

On white

13.17
#2D128F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#2D128F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D128F
13.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D128F#FFFFFF#000000##FFFFFF
##2D128F1.0013.171.5913.17
#FFFFFF13.171.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003592
Deuteranopia (green-blind)
#002B8D
Tritanopia (blue-blind)
#003B54
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2d128f;
/* rgb */ color: rgb(45, 18, 143);
/* oklch */ color: oklch(33.1% 0.183 279.5);
Tailwind
colors: {
  custom: {
    50: '#7657b1',
    500: '#2d128f',
    950: '#000000',
  },
}
SCSS
$custom: #2d128f;
$custom-light: #7657b1;
$custom-dark: #000000;
JSON
{
  "hex": "#2d128f",
  "rgb": {
    "r": 45,
    "g": 18,
    "b": 143
  },
  "hsl": {
    "h": 252.96,
    "s": 77.64,
    "l": 31.569
  },
  "oklch": {
    "l": 0.33131,
    "c": 0.18287,
    "h": 279.5
  },
  "luminance": 0.02974
}

Semantic roles & 50–950 ramp

primary
#2D128F
secondary
#A5C33A
accent
#F434CB
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0311
muted
#7C7880

Preview Lab

Preview with #2D128F

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

Preview Lab → · Contrast checker → · Palette generator →

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