#2F178F#2F178F

#2F178F is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.8% C 0.179 H 280.1°. Best body text is #FFFFFF at 12.80:1 contrast (WCAG AA passes).

Color values

HEX#2F178F
RGBrgb(47, 23, 143)
HSLhsl(252, 72%, 33%)
HSVhsv(252, 84%, 56%)
CMYKcmyk(67.1%, 83.9%, 0%, 43.9%)
CIE-LABlab(20.83, 45.05, -61.00)
CIE-LCHlch(20.83, 75.83, 306.45°)
OKLaboklab(33.79% 0.0312 -0.1761)
OKLCHoklch(33.79% 0.179 280.1)
XYZxyz(6.4350, 3.1998, 26.2598)
Luminance0.0320 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F178F #778F17
analogous
#173B8F #2F178F #6B178F
triadic
#2F178F #8F2F17 #178F2F
tetradic
#2F178F #8F173B #778F17 #178F6B
square
#2F178F #8F173B #778F17 #178F6B
split-complementary
#2F178F #8F6B17 #3B8F17
monochromatic
#0C0626 #1E0F5A #2F178F #401FC4 #6040E0

Accessibility & contrast

On white

12.80
#2F178F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#2F178F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F178F
12.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F178F#FFFFFF#000000##FFFFFF
##2F178F1.0012.801.6412.80
#FFFFFF12.801.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003692
Deuteranopia (green-blind)
#002D8D
Tritanopia (blue-blind)
#003D54
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #2f178f;
/* rgb */ color: rgb(47, 23, 143);
/* oklch */ color: oklch(33.8% 0.179 280.1);
Tailwind
colors: {
  custom: {
    50: '#7659b1',
    500: '#2f178f',
    950: '#000000',
  },
}
SCSS
$custom: #2f178f;
$custom-light: #7659b1;
$custom-dark: #000000;
JSON
{
  "hex": "#2f178f",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 143
  },
  "hsl": {
    "h": 252,
    "s": 72.289,
    "l": 32.549
  },
  "oklch": {
    "l": 0.33787,
    "c": 0.17884,
    "h": 280.1
  },
  "luminance": 0.032
}

Semantic roles & 50–950 ramp

primary
#2F178F
secondary
#A7C141
accent
#EF39CB
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2F178F

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

Preview Lab → · Contrast checker → · Palette generator →

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