Skip to content

#2b104f

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

RGB
43, 16, 79
HSL
266°, 66%, 19%
CMYK
46, 80, 0, 69
Luminance
0.0145

At a glance

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

Hex
#2b104f
Hue
266°
violet
Saturation
66%
vivid
Lightness
19%
deep
Brightness
31%
HSV value
Perceived
15%
weighted brightness
Luminance
0.0145
WCAG relative
Temperature
Cool
69/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
16.28:1
Closest name
Midnight Blue
ΔE2000 7.6
Where it sits
Hue266° of 360°
Saturation66%
Lightness19%
Temperature
Warm ← → Cool69% 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#2b104f
RGBrgb(43, 16, 79)
HSLhsl(266, 66%, 19%)
CMYKcmyk(46%, 80%, 0%, 69%)
LABlab(12.3 28.6 -33.4)
LCHlch(12.3 44.0 310.6)
OKLCHoklch(0.257 0.108 297.8)
Decimal2822223
Display P3color(display-p3 0.169 0.063 0.310)

Copy-ready code

/* CSS */
color: #2b104f;
background-color: #2b104f;
/* Tailwind (arbitrary) */
class="text-[#2b104f] bg-[#2b104f]"
/* SCSS */
$brand: #2b104f;
/* SwiftUI */
Color(red: 0.169, green: 0.063, blue: 0.310)
/* Android */
Color.parseColor("#2b104f")
/* Flutter */
Color(0xFF2B104F)
/* Python / OpenCV (BGR) */
(79, 16, 43)

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

Accessibility — WCAG contrast

Aa
#2b104f on white: 16.28:1
AA ✓ pass · AA-large · AAA
Aa
#2b104f on black: 1.29:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #002051
deuteranopia · #001F4E
tritanopia · #22202E

Color scale — 50 to 950

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

#F7F3FB
#EFE8F8
#DBCBF1
#C2A2EC
#A373E3
#8444D9
#6F29CC
#5C22AA
#4A1B88
#381863
#2b104f
Base = 950Lightest = 50 · #F7F3FBDarkest = 950 · #2b104f
:root {
  --brand-50: #F7F3FB;
  --brand-100: #EFE8F8;
  --brand-200: #DBCBF1;
  --brand-300: #C2A2EC;
  --brand-400: #A373E3;
  --brand-500: #8444D9;
  --brand-600: #6F29CC;
  --brand-700: #5C22AA;
  --brand-800: #4A1B88;
  --brand-900: #381863;
  --brand-950: #2b104f;
  --brand: #2b104f;
  --brand-ink: #ffffff;
}

Colors that work with #2b104f

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#F7F4FA
Tinted page background
Border#D3C0ED
Hairlines and dividers
Muted text#6D4B9B
Captions on the surface
Accent#45510E
Second voice, not a rival
Dark variant#3A156A
Hover, pressed, headers
Light variant#F1EAFB
Selected rows, tints
Dark surface#1B1424
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 #2b104f

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#344F10
Analogous left#10144F
Analogous right#4A104F
Split-complement 1#4F4A10
Split-complement 2#144F10
Triadic 1#4F2B10
Triadic 2#104F2B
Tetradic#4F1014

RGB percentages

Red16.9%
Green6.3%
Blue31.0%

CMYK percentages

Cyan45.6%
Magenta79.7%
Yellow0.0%
Key (black)69.0%

Color previews

#2b104f text on a black background

contrast 1.29:1

Card sample

#2b104f text on a white background

contrast 16.28:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(43, 16, 79, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(43, 16, 79, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2b104f;
background: linear-gradient(135deg, #2b104f, #4F1049);

Monochromatic scale

Palettes built from #2b104f

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.

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

#2b104f, answered

What color is #2b104f?

#2b104f is a deep vivid violet, closest to Midnight Blue (ΔE2000 7.6). It sits at 266° on the hue wheel with 66% saturation and 19% lightness, which reads as cool.

What is the RGB value of #2b104f?

rgb(43, 16, 79) — 43 red, 16 green and 79 blue out of 255, or 16.9% / 6.3% / 31% by channel.

Is #2b104f a light or a dark color?

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

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

White. It scores 16.28:1 against #2b104f, versus 1.29:1 for black — AAA at any size.

What is the complementary color of #2b104f?

#344F10 sits directly opposite on the wheel. Softer options are the split-complements #4F4A10 and #144F10, which give the same contrast with far less vibration.

What colors go well with #2b104f?

For interface work: #F7F4FA as the surface, #D3C0ED for borders, #6D4B9B for secondary text, #45510E as an accent and #3A156A for hover and pressed states. For a palette, the analogous pair #10144F and #4A104F stays calm, while #344F10 is the loudest partner.

What is #2b104f in CMYK for printing?

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

Is #2b104f warm or cool?

Cool — it scores 69 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #42104F; nudged cooler, #130F50.

Work with #2b104f in the Color Lab