#2F166B#2F166B

#2F166B is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.7% C 0.136 H 288.6°. Best body text is #FFFFFF at 14.50:1 contrast (WCAG AA passes).

Color values

HEX#2F166B
RGBrgb(47, 22, 107)
HSLhsl(258, 66%, 25%)
HSVhsv(258, 79%, 42%)
CMYKcmyk(56.1%, 79.4%, 0%, 58%)
CIE-LABlab(16.70, 34.59, -44.87)
CIE-LCHlch(16.70, 56.65, 307.64°)
OKLaboklab(29.74% 0.0435 -0.129)
OKLCHoklch(29.74% 0.136 288.6)
XYZxyz(4.1123, 2.2395, 14.1227)
Luminance0.0224 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F166B #526B16
analogous
#16286B #2F166B #59166B
triadic
#2F166B #6B2F16 #166B2F
tetradic
#2F166B #6B1628 #526B16 #166B59
square
#2F166B #6B1628 #526B16 #166B59
split-complementary
#2F166B #6B5916 #286B16
monochromatic
#0B0519 #190C38 #2F166B #45209E #5C2BD1

Accessibility & contrast

On white

14.50
#2F166B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#2F166B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F166B
14.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F166B#FFFFFF#000000##FFFFFF
##2F166B1.0014.501.4514.50
#FFFFFF14.501.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B6D
Deuteranopia (green-blind)
#002769
Tritanopia (blue-blind)
#172E3F
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2f166b;
/* rgb */ color: rgb(47, 22, 107);
/* oklch */ color: oklch(29.7% 0.136 288.6);
Tailwind
colors: {
  custom: {
    50: '#6f5696',
    500: '#2f166b',
    950: '#000000',
  },
}
SCSS
$custom: #2f166b;
$custom-light: #6f5696;
$custom-dark: #000000;
JSON
{
  "hex": "#2f166b",
  "rgb": {
    "r": 47,
    "g": 22,
    "b": 107
  },
  "hsl": {
    "h": 257.647,
    "s": 65.891,
    "l": 25.294
  },
  "oklch": {
    "l": 0.29737,
    "c": 0.13615,
    "h": 288.6
  },
  "luminance": 0.0224
}

Semantic roles & 50–950 ramp

primary
#2F166B
secondary
#83A13B
accent
#E93FB7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #2F166B

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

Preview Lab → · Contrast checker → · Palette generator →

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