#2F127E#2F127E

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

Color values

HEX#2F127E
RGBrgb(47, 18, 126)
HSLhsl(256, 75%, 28%)
HSVhsv(256, 86%, 49%)
CMYKcmyk(62.7%, 85.7%, 0%, 50.6%)
CIE-LABlab(18.11, 42.21, -54.79)
CIE-LCHlch(18.11, 69.16, 307.61°)
OKLaboklab(31.34% 0.0398 -0.1579)
OKLCHoklch(31.34% 0.163 284.1)
XYZxyz(5.1533, 2.5430, 19.9539)
Luminance0.0254 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F127E #617E12
analogous
#122B7E #2F127E #65127E
triadic
#2F127E #7E2F12 #127E2F
tetradic
#2F127E #7E122B #617E12 #127E65
square
#2F127E #7E122B #617E12 #127E65
split-complementary
#2F127E #7E6512 #2B7E12
monochromatic
#0A041B #1B0A48 #2F127E #431AB4 #5B2AE1

Accessibility & contrast

On white

13.92
#2F127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2F127E
13.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F127E#FFFFFF#000000##FFFFFF
##2F127E1.0013.921.5113.92
#FFFFFF13.921.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F81
Deuteranopia (green-blind)
#00297C
Tritanopia (blue-blind)
#00344A
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2f127e;
/* rgb */ color: rgb(47, 18, 126);
/* oklch */ color: oklch(31.3% 0.163 284.1);
Tailwind
colors: {
  custom: {
    50: '#7356a5',
    500: '#2f127e',
    950: '#000000',
  },
}
SCSS
$custom: #2f127e;
$custom-light: #7356a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2f127e",
  "rgb": {
    "r": 47,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 256.111,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.3134,
    "c": 0.16288,
    "h": 284.1
  },
  "luminance": 0.02543
}

Semantic roles & 50–950 ramp

primary
#2F127E
secondary
#93B438
accent
#F236BF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F127E

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

Preview Lab → · Contrast checker → · Palette generator →

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