Skip to content

#2d0849

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

RGB
45, 8, 73
HSL
274°, 80%, 16%
CMYK
38, 89, 0, 71
Luminance
0.0121

At a glance

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

Hex
#2d0849
Hue
274°
violet
Saturation
80%
electric
Lightness
16%
deep
Brightness
29%
HSV value
Perceived
14%
weighted brightness
Luminance
0.0121
WCAG relative
Temperature
Cool
64/100 cool
Color family
Violet
Tone
Electric
Best ink
White
16.90:1
Closest name
Midnight Blue
ΔE2000 9.4
Where it sits
Hue274° of 360°
Saturation80%
Lightness16%
Temperature
Warm ← → Cool64% 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#2d0849
RGBrgb(45, 8, 73)
HSLhsl(274, 80%, 16%)
CMYKcmyk(38%, 89%, 0%, 71%)
LABlab(10.7 31.2 -31.9)
LCHlch(10.7 44.6 314.4)
OKLCHoklch(0.244 0.111 305.0)
Decimal2951241
Display P3color(display-p3 0.176 0.031 0.286)

Copy-ready code

/* CSS */
color: #2d0849;
background-color: #2d0849;
/* Tailwind (arbitrary) */
class="text-[#2d0849] bg-[#2d0849]"
/* SCSS */
$brand: #2d0849;
/* SwiftUI */
Color(red: 0.176, green: 0.031, blue: 0.286)
/* Android */
Color.parseColor("#2d0849")
/* Flutter */
Color(0xFF2D0849)
/* Python / OpenCV (BGR) */
(73, 8, 45)

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 #2d0849 · 16.90:1
Use #ffffffAAA at every size.
Aa
White text · 16.90:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.24:1
AA fail · AA large fail · AAA fail
Reading the other direction: #2d0849 as text scores 16.90:1 on white and 1.24:1 on black.

Accessibility — WCAG contrast

Aa
#2d0849 on white: 16.90:1
AA ✓ pass · AA-large · AAA
Aa
#2d0849 on black: 1.24:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #001C4B
deuteranopia · #001D48
tritanopia · #281A29

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #2d0849 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.

#F8F3FC
#F1E6F9
#E1C6F5
#CD9AF4
#B467EE
#9B35E9
#8818DD
#7114B8
#5B1093
#44106A
#2d0849
Base = 950Lightest = 50 · #F8F3FCDarkest = 950 · #2d0849
:root {
  --brand-50: #F8F3FC;
  --brand-100: #F1E6F9;
  --brand-200: #E1C6F5;
  --brand-300: #CD9AF4;
  --brand-400: #B467EE;
  --brand-500: #9B35E9;
  --brand-600: #8818DD;
  --brand-700: #7114B8;
  --brand-800: #5B1093;
  --brand-900: #44106A;
  --brand-950: #2d0849;
  --brand: #2d0849;
  --brand-ink: #ffffff;
}

Colors that work with #2d0849

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#D9C0ED
Hairlines and dividers
Muted text#784B9B
Captions on the surface
Accent#354B06
Second voice, not a rival
Dark variant#470D73
Hover, pressed, headers
Light variant#F4E8FC
Selected rows, tints
Dark surface#1D1424
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 #2d0849

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#244908
Analogous left#0D0849
Analogous right#490845
Split-complement 1#454908
Split-complement 2#08490D
Triadic 1#492D08
Triadic 2#08492D
Tetradic#490D08

RGB percentages

Red17.6%
Green3.1%
Blue28.6%

CMYK percentages

Cyan38.4%
Magenta89.0%
Yellow0.0%
Key (black)71.4%

Color previews

#2d0849 text on a black background

contrast 1.24:1

Card sample

#2d0849 text on a white background

contrast 16.90:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(45, 8, 73, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(45, 8, 73, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2d0849;
background: linear-gradient(135deg, #2d0849, #49083A);

Monochromatic scale

Palettes built from #2d0849

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.

#2d0849 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

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#2d0849, answered

What color is #2d0849?

#2d0849 is a deep electric violet, closest to Midnight Blue (ΔE2000 9.4). It sits at 274° on the hue wheel with 80% saturation and 16% lightness, which reads as cool.

What is the RGB value of #2d0849?

rgb(45, 8, 73) — 45 red, 8 green and 73 blue out of 255, or 17.6% / 3.1% / 28.6% by channel.

Is #2d0849 a light or a dark color?

It is a dark color. Relative luminance is 0.0121 and perceived brightness is 14%, so white text on it reaches 16.90:1.

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

White. It scores 16.90:1 against #2d0849, versus 1.24:1 for black — AAA at any size.

What is the complementary color of #2d0849?

#244908 sits directly opposite on the wheel. Softer options are the split-complements #454908 and #08490D, which give the same contrast with far less vibration.

What colors go well with #2d0849?

For interface work: #F8F4FA as the surface, #D9C0ED for borders, #784B9B for secondary text, #354B06 as an accent and #470D73 for hover and pressed states. For a palette, the analogous pair #0D0849 and #490845 stays calm, while #244908 is the loudest partner.

What is #2d0849 in CMYK for printing?

cmyk(38%, 89%, 0%, 71%). This is a screen-to-ink approximation — a color this saturated sits outside most CMYK gamuts and will print duller than it looks here.

Is #2d0849 warm or cool?

Cool — it scores 64 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #450849; nudged cooler, #15074A.

Work with #2d0849 in the Color Lab