#2F127F#2F127F

#2F127F is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.5% C 0.164 H 283.9°. Best body text is #FFFFFF at 13.87:1 contrast (WCAG AA passes).

Color values

HEX#2F127F
RGBrgb(47, 18, 127)
HSLhsl(256, 75%, 28%)
HSVhsv(256, 86%, 50%)
CMYKcmyk(63%, 85.8%, 0%, 50.2%)
CIE-LABlab(18.23, 42.50, -55.23)
CIE-LCHlch(18.23, 69.69, 307.58°)
OKLaboklab(31.45% 0.0394 -0.1592)
OKLCHoklch(31.45% 0.164 283.9)
XYZxyz(5.2182, 2.5689, 20.2954)
Luminance0.0257 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F127F #627F12
analogous
#122C7F #2F127F #65127F
triadic
#2F127F #7F2F12 #127F2F
tetradic
#2F127F #7F122C #627F12 #127F65
square
#2F127F #7F122C #627F12 #127F65
split-complementary
#2F127F #7F6512 #2C7F12
monochromatic
#0A041B #1B0A49 #2F127F #431AB5 #5B2BE1

Accessibility & contrast

On white

13.87
#2F127F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#2F127F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F127F
13.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F127F#FFFFFF#000000##FFFFFF
##2F127F1.0013.871.5113.87
#FFFFFF13.871.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003082
Deuteranopia (green-blind)
#00297D
Tritanopia (blue-blind)
#00344A
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2f127f;
/* rgb */ color: rgb(47, 18, 127);
/* oklch */ color: oklch(31.5% 0.164 283.9);
Tailwind
colors: {
  custom: {
    50: '#7356a5',
    500: '#2f127f',
    950: '#000000',
  },
}
SCSS
$custom: #2f127f;
$custom-light: #7356a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2f127f",
  "rgb": {
    "r": 47,
    "g": 18,
    "b": 127
  },
  "hsl": {
    "h": 255.963,
    "s": 75.172,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31453,
    "c": 0.16405,
    "h": 283.9
  },
  "luminance": 0.02569
}

Semantic roles & 50–950 ramp

primary
#2F127F
secondary
#94B538
accent
#F236C0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F127F

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

Preview Lab → · Contrast checker → · Palette generator →

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