Skip to content

#2d0139

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

RGB
45, 1, 57
HSL
287°, 97%, 11%
CMYK
21, 98, 0, 78
Luminance
0.0088

At a glance

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

Hex
#2d0139
Hue
287°
violet
Saturation
97%
electric
Lightness
11%
deep
Brightness
22%
HSV value
Perceived
12%
weighted brightness
Luminance
0.0088
WCAG relative
Temperature
Neutral
57/100 cool
Color family
Violet
Tone
Electric
Best ink
White
17.87:1
Closest name
Midnight Blue
ΔE2000 13.2
Where it sits
Hue287° of 360°
Saturation97%
Lightness11%
Temperature
Warm ← → Cool57% cool

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

Every format

HEX#2d0139
RGBrgb(45, 1, 57)
HSLhsl(287, 97%, 11%)
CMYKcmyk(21%, 98%, 0%, 78%)
LABlab(7.9 31.0 -24.9)
LCHlch(7.9 39.8 321.2)
OKLCHoklch(0.220 0.104 317.6)
Decimal2949433
Display P3color(display-p3 0.176 0.004 0.224)

Copy-ready code

/* CSS */
color: #2d0139;
background-color: #2d0139;
/* Tailwind (arbitrary) */
class="text-[#2d0139] bg-[#2d0139]"
/* SCSS */
$brand: #2d0139;
/* SwiftUI */
Color(red: 0.176, green: 0.004, blue: 0.224)
/* Android */
Color.parseColor("#2d0139")
/* Flutter */
Color(0xFF2D0139)
/* Python / OpenCV (BGR) */
(57, 1, 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 #2d0139 · 17.87:1
Use #ffffffAAA at every size.
Aa
White text · 17.87:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.18:1
AA fail · AA large fail · AAA fail
Reading the other direction: #2d0139 as text scores 17.87:1 on white and 1.18:1 on black.

Accessibility — WCAG contrast

Aa
#2d0139 on white: 17.87:1
AA ✓ pass · AA-large · AAA
Aa
#2d0139 on black: 1.18:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #00153A
deuteranopia · #021938
tritanopia · #2C0E1E

Color scale — 50 to 950

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

#FBF1FD
#F7E4FC
#EEC1FB
#E691FD
#D95AFC
#CD22FB
#BE04F1
#9E03C9
#7F03A0
#5C0774
#2d0139
Base = 950Lightest = 50 · #FBF1FDDarkest = 950 · #2d0139
:root {
  --brand-50: #FBF1FD;
  --brand-100: #F7E4FC;
  --brand-200: #EEC1FB;
  --brand-300: #E691FD;
  --brand-400: #D95AFC;
  --brand-500: #CD22FB;
  --brand-600: #BE04F1;
  --brand-700: #9E03C9;
  --brand-800: #7F03A0;
  --brand-900: #5C0774;
  --brand-950: #2d0139;
  --brand: #2d0139;
  --brand-ink: #ffffff;
}

Colors that work with #2d0139

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#F9F4FA
Tinted page background
Border#E3C0ED
Hairlines and dividers
Muted text#8A4B9B
Captions on the surface
Accent#1B3A00
Second voice, not a rival
Dark variant#63027D
Hover, pressed, headers
Light variant#F9E6FF
Selected rows, tints
Dark surface#211424
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 #2d0139

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#0D3901
Analogous left#110139
Analogous right#390129
Split-complement 1#293901
Split-complement 2#013911
Triadic 1#392D01
Triadic 2#01392D
Tetradic#391101

RGB percentages

Red17.6%
Green0.4%
Blue22.4%

CMYK percentages

Cyan21.1%
Magenta98.2%
Yellow0.0%
Key (black)77.6%

Color previews

#2d0139 text on a black background

contrast 1.18:1

Card sample

#2d0139 text on a white background

contrast 17.87:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2d0139

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.

#2d0139 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.

#2d0139, answered

What color is #2d0139?

#2d0139 is a deep electric violet, closest to Midnight Blue (ΔE2000 13.2). It sits at 287° on the hue wheel with 97% saturation and 11% lightness, which reads as neutral.

What is the RGB value of #2d0139?

rgb(45, 1, 57) — 45 red, 1 green and 57 blue out of 255, or 17.6% / 0.4% / 22.4% by channel.

Is #2d0139 a light or a dark color?

It is a dark color. Relative luminance is 0.0088 and perceived brightness is 12%, so white text on it reaches 17.87:1.

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

White. It scores 17.87:1 against #2d0139, versus 1.18:1 for black — AAA at any size.

What is the complementary color of #2d0139?

#0D3901 sits directly opposite on the wheel. Softer options are the split-complements #293901 and #013911, which give the same contrast with far less vibration.

What colors go well with #2d0139?

For interface work: #F9F4FA as the surface, #E3C0ED for borders, #8A4B9B for secondary text, #1B3A00 as an accent and #63027D for hover and pressed states. For a palette, the analogous pair #110139 and #390129 stays calm, while #0D3901 is the loudest partner.

What is #2d0139 in CMYK for printing?

cmyk(21%, 98%, 0%, 78%). 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 #2d0139 warm or cool?

Neutral — it scores 57 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #390131; nudged cooler, #18003A.

Work with #2d0139 in the Color Lab