#2F167E#2F167E

#2F167E is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.159 H 283.6°. Best body text is #FFFFFF at 13.66:1 contrast (WCAG AA passes).

Color values

HEX#2F167E
RGBrgb(47, 22, 126)
HSLhsl(254, 70%, 29%)
HSVhsv(254, 83%, 49%)
CMYKcmyk(62.7%, 82.5%, 0%, 50.6%)
CIE-LABlab(18.73, 40.40, -53.76)
CIE-LCHlch(18.73, 67.25, 306.92°)
OKLaboklab(31.77% 0.0375 -0.155)
OKLCHoklch(31.77% 0.159 283.6)
XYZxyz(5.2239, 2.6842, 19.9774)
Luminance0.0268 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F167E #657E16
analogous
#16317E #2F167E #63167E
triadic
#2F167E #7E2F16 #167E2F
tetradic
#2F167E #7E1631 #657E16 #167E63
square
#2F167E #7E1631 #657E16 #167E63
split-complementary
#2F167E #7E6316 #317E16
monochromatic
#0A051A #1C0D4A #2F167E #421FB2 #5B33DB

Accessibility & contrast

On white

13.66
#2F167E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#2F167E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F167E
13.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F167E#FFFFFF#000000##FFFFFF
##2F167E1.0013.661.5413.66
#FFFFFF13.661.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003181
Deuteranopia (green-blind)
#002A7C
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2f167e;
/* rgb */ color: rgb(47, 22, 126);
/* oklch */ color: oklch(31.8% 0.159 283.6);
Tailwind
colors: {
  custom: {
    50: '#7358a4',
    500: '#2f167e',
    950: '#000000',
  },
}
SCSS
$custom: #2f167e;
$custom-light: #7358a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2f167e",
  "rgb": {
    "r": 47,
    "g": 22,
    "b": 126
  },
  "hsl": {
    "h": 254.423,
    "s": 70.27,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31768,
    "c": 0.15948,
    "h": 283.6
  },
  "luminance": 0.02685
}

Semantic roles & 50–950 ramp

primary
#2F167E
secondary
#97B33D
accent
#ED3BC2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F167E

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

Preview Lab → · Contrast checker → · Palette generator →

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