#2F176C#2F176C

#2F176C is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.0% C 0.136 H 288.1°. Best body text is #FFFFFF at 14.38:1 contrast (WCAG AA passes).

Color values

HEX#2F176C
RGBrgb(47, 23, 108)
HSLhsl(257, 65%, 26%)
HSVhsv(257, 79%, 42%)
CMYKcmyk(56.5%, 78.7%, 0%, 57.6%)
CIE-LABlab(16.99, 34.37, -45.04)
CIE-LCHlch(16.99, 56.66, 307.35°)
OKLaboklab(29.97% 0.0424 -0.1295)
OKLCHoklch(29.97% 0.136 288.1)
XYZxyz(4.1847, 2.2996, 14.4078)
Luminance0.0230 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F176C #546C17
analogous
#17296C #2F176C #59176C
triadic
#2F176C #6C2F17 #176C2F
tetradic
#2F176C #6C1729 #546C17 #176C59
square
#2F176C #6C1729 #546C17 #176C59
split-complementary
#2F176C #6C5917 #296C17
monochromatic
#0B0519 #190C3A #2F176C #45229E #5B2CD1

Accessibility & contrast

On white

14.38
#2F176C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#2F176C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F176C
14.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F176C#FFFFFF#000000##FFFFFF
##2F176C1.0014.381.4614.38
#FFFFFF14.381.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C6E
Deuteranopia (green-blind)
#00286A
Tritanopia (blue-blind)
#162F40
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #2f176c;
/* rgb */ color: rgb(47, 23, 108);
/* oklch */ color: oklch(30.0% 0.136 288.1);
Tailwind
colors: {
  custom: {
    50: '#6f5797',
    500: '#2f176c',
    950: '#000000',
  },
}
SCSS
$custom: #2f176c;
$custom-light: #6f5797;
$custom-dark: #000000;
JSON
{
  "hex": "#2f176c",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 108
  },
  "hsl": {
    "h": 256.941,
    "s": 64.885,
    "l": 25.686
  },
  "oklch": {
    "l": 0.29972,
    "c": 0.1363,
    "h": 288.1
  },
  "luminance": 0.023
}

Semantic roles & 50–950 ramp

primary
#2F176C
secondary
#85A23D
accent
#E840B8
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #2F176C

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

Preview Lab → · Contrast checker → · Palette generator →

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