Skip to content

#2f1249

a deep, vivid violet · cool · closest name: Midnight Blue

RGB
47, 18, 73
HSL
272°, 60%, 18%
CMYK
36, 75, 0, 71
Luminance
0.0152

At a glance

Every number on this page in one read: what #2f1249 is made of, how bright it looks, and which way it leans.

Hex
#2f1249
Hue
272°
violet
Saturation
60%
vivid
Lightness
18%
deep
Brightness
29%
HSV value
Perceived
15%
weighted brightness
Luminance
0.0152
WCAG relative
Temperature
Cool
66/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
16.11:1
Closest name
Midnight Blue
ΔE2000 9.6
Where it sits
Hue272° of 360°
Saturation60%
Lightness18%
Temperature
Warm ← → Cool66% cool

Reads cool. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#2f1249
RGBrgb(47, 18, 73)
HSLhsl(272, 60%, 18%)
CMYKcmyk(36%, 75%, 0%, 71%)
LABlab(12.7 26.7 -28.5)
LCHlch(12.7 39.0 313.1)
OKLCHoklch(0.259 0.098 304.6)
Decimal3084873
Display P3color(display-p3 0.184 0.071 0.286)

Copy-ready code

/* CSS */
color: #2f1249;
background-color: #2f1249;
/* Tailwind (arbitrary) */
class="text-[#2f1249] bg-[#2f1249]"
/* SCSS */
$brand: #2f1249;
/* SwiftUI */
Color(red: 0.184, green: 0.071, blue: 0.286)
/* Android */
Color.parseColor("#2f1249")
/* Flutter */
Color(0xFF2F1249)
/* Python / OpenCV (BGR) */
(73, 18, 47)

Best text color

Only one of black and white can be right. This is the one, with the number that proves it.

Readable at a glance#ffffff on #2f1249 · 16.11:1
Use #ffffffAAA at every size.
Aa
White text · 16.11:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.30:1
AA fail · AA large fail · AAA fail
Reading the other direction: #2f1249 as text scores 16.11:1 on white and 1.30:1 on black.

Accessibility — WCAG contrast

Aa
#2f1249 on white: 16.11:1
AA ✓ pass · AA-large · AAA
Aa
#2f1249 on black: 1.30:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #00204B
deuteranopia · #022148
tritanopia · #2A1E2B

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #2f1249 is pinned to step 950; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F8F4FB
#F0E8F7
#DFCCEF
#C9A5E9
#AE78DE
#924BD3
#7E30C4
#6928A4
#542083
#3F1B5F
#2f1249
Base = 950Lightest = 50 · #F8F4FBDarkest = 950 · #2f1249
:root {
  --brand-50: #F8F4FB;
  --brand-100: #F0E8F7;
  --brand-200: #DFCCEF;
  --brand-300: #C9A5E9;
  --brand-400: #AE78DE;
  --brand-500: #924BD3;
  --brand-600: #7E30C4;
  --brand-700: #6928A4;
  --brand-800: #542083;
  --brand-900: #3F1B5F;
  --brand-950: #2f1249;
  --brand: #2f1249;
  --brand-ink: #ffffff;
}

Colors that work with #2f1249

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#F8F4FA
Tinted page background
Border#D7C0ED
Hairlines and dividers
Muted text#754B9B
Captions on the surface
Accent#3A4B10
Second voice, not a rival
Dark variant#421966
Hover, pressed, headers
Light variant#F3EBFA
Selected rows, tints
Dark surface#1C1424
Dark-mode background
Light mode
Everything in its place

Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.

Primary actionSecondaryBadge
Dark mode
Same hue, inverted

Lightness flips, hue holds. The accent stays the anchor in both themes.

Primary actionSecondaryAccent

How to use #2f1249

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links on white
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Full-page backgrounds — tiring over long sessions
  • Black text placed on it
  • Pairing with a same-lightness hue — edges vibrate

Similar colors

One move away from this hex in each direction. Every swatch is its own page.

Color relationships

The wheel positions with their names attached, so you can grab the one you actually need.

Complementary#2C4912
Analogous left#131249
Analogous right#491247
Split-complement 1#474912
Split-complement 2#124913
Triadic 1#492F12
Triadic 2#12492F
Tetradic#491312

RGB percentages

Red18.4%
Green7.1%
Blue28.6%

CMYK percentages

Cyan35.6%
Magenta75.3%
Yellow0.0%
Key (black)71.4%

Color previews

#2f1249 text on a black background

contrast 1.30:1

Card sample

#2f1249 text on a white background

contrast 16.11:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #2f1249;
Background color
Panel with #2f1249 background
background-color: #2f1249;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #2f1249;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(47, 18, 73, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 18, 73, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f1249;
background: linear-gradient(135deg, #2f1249, #49123E);

Monochromatic scale

Palettes built from #2f1249

Shades — darker

Tints — lighter

Color harmonies

Nearest named colors

Ranked with CIEDE2000 across all 139 CSS keywords. Under ΔE 2 the eye stops telling them apart; over ΔE 10 they are plainly different colors.

#2f1249 in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
Creative toolsFintechBeautyLuxury
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Converts to four-color process without much drama. Proof it anyway.

#2f1249, answered

What color is #2f1249?

#2f1249 is a deep vivid violet, closest to Midnight Blue (ΔE2000 9.6). It sits at 272° on the hue wheel with 60% saturation and 18% lightness, which reads as cool.

What is the RGB value of #2f1249?

rgb(47, 18, 73) — 47 red, 18 green and 73 blue out of 255, or 18.4% / 7.1% / 28.6% by channel.

Is #2f1249 a light or a dark color?

It is a dark color. Relative luminance is 0.0152 and perceived brightness is 15%, so white text on it reaches 16.11:1.

Should I use black or white text on #2f1249?

White. It scores 16.11:1 against #2f1249, versus 1.30:1 for black — AAA at any size.

What is the complementary color of #2f1249?

#2C4912 sits directly opposite on the wheel. Softer options are the split-complements #474912 and #124913, which give the same contrast with far less vibration.

What colors go well with #2f1249?

For interface work: #F8F4FA as the surface, #D7C0ED for borders, #754B9B for secondary text, #3A4B10 as an accent and #421966 for hover and pressed states. For a palette, the analogous pair #131249 and #491247 stays calm, while #2C4912 is the loudest partner.

What is #2f1249 in CMYK for printing?

cmyk(36%, 75%, 0%, 71%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #2f1249 warm or cool?

Cool — it scores 66 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #431249; nudged cooler, #1A114A.

Work with #2f1249 in the Color Lab