Skip to content
blue · cool

#33278d

a dark, vivid blue · cool · closest name: Midnight Blue

Token name suggestion: Shadow Sapphire

RGB
51, 39, 141
HSL
247°, 57%, 35%
CMYK
64, 72, 0, 45
Luminance
0.0408

#33278d is a dark vivid blue, 247° on the wheel and 79/100 on the cool side. Put white text on it (11.57:1). As text it scores 11.57:1 on white — safe at any size. Nearest name is Midnight Blue, nearest Tailwind family is indigo.

hsl(247 57% 35%)rgb(51 39 141)Base step 800AAA inkCool

At a glance

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

Hex
#33278d
Hue
247°
blue
Saturation
57%
vivid
Lightness
35%
dark
Brightness
55%
HSV value
Perceived
25%
weighted brightness
Luminance
0.0408
WCAG relative
Temperature
Cool
79/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
11.57:1
Closest name
Midnight Blue
ΔE2000 5.8
Chroma
65.7
LCH, 0–130ish
OKLCH L
0.360
perceptual lightness
Tailwind
indigo
500 · ΔE 23
Web-safe
#333399
nearest of 216
Where it sits
Hue247° of 360°
Saturation57%
Lightness35%
Saturation × lightness field

Left edge is grey, right edge is full chroma; top is white, bottom is black. The dot is #33278d.

Temperature
Warm ← → Cool79% cool

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

Luminance by channel
Red17%
Green36%
Blue47%

Green carries most of what the eye calls brightness — that is why WCAG weights it 0.7152.

Every format

HEX#33278d
HEX (8-digit)#33278dff
RGBrgb(51, 39, 141)
RGBArgba(51, 39, 141, 1)
HSLhsl(247, 57%, 35%)
HSV / HSBhsv(247, 72%, 55%)
HWBhwb(247 15% 45%)
CMYKcmyk(64%, 72%, 0%, 45%)
LABlab(23.9 36.5 -54.6)
LCHlch(23.9 65.7 303.7)
OKLCHoklch(0.360 0.160 280.0)
XYZ (D65)xyz(6.90, 4.08, 25.62)
Decimal3352461
Display P3color(display-p3 0.200 0.153 0.553)
Web-safe#333399

Copy-ready code

every platformclick to select
/* CSS */
color: #33278d;
background-color: #33278d;
/* CSS custom property */
--brand: #33278d;
/* Tailwind (arbitrary) */
class="text-[#33278d] bg-[#33278d]"
/* SCSS */
$brand: #33278d;
/* SwiftUI */
Color(red: 0.200, green: 0.153, blue: 0.553)
/* UIKit */
UIColor(red: 0.200, green: 0.153, blue: 0.553, alpha: 1)
/* Android XML */
<color name="brand">#33278D</color>
/* Android Compose */
Color(0xFF33278D)
/* Flutter */
Color(0xFF33278D)
/* Python / OpenCV (BGR) */
(141, 39, 51)
/* Python / PIL (RGB) */
(51, 39, 141)
/* Java AWT */
new Color(51, 39, 141)
/* .NET */
Color.FromArgb(255, 51, 39, 141)
/* OpenGL / Unity (0–1) */
(0.2000f, 0.1529f, 0.5529f, 1f)
/* LaTeX */
\definecolor{brand}{RGB}{51,39,141}
modern cssclick to select
/* mix without leaving CSS */
background: color-mix(in oklab, #33278d 85%, white);
border-color: color-mix(in oklab, #33278d 40%, transparent);
/* theme-aware in one line */
color: light-dark(#241C64, #D6D3EE);
/* relative colour syntax */
--hover: hsl(from #33278d h s calc(l - 7));

Design tokens

The same ramp in the four formats a team actually needs. Paste one and the whole palette lands with it.

css custom propertiesclick to select
:root {
  --brand-50: #F5F4FB;
  --brand-100: #EBE9F6;
  --brand-200: #D1CDEE;
  --brand-300: #AFA7E7;
  --brand-400: #867BDB;
  --brand-500: #5E4FCE;
  --brand-600: #4535C0;
  --brand-700: #3A2CA0;
  --brand-800: #33278d;
  --brand-900: #251D5D;
  --brand-950: #17123A;
  --brand: #33278d;
  --brand-ink: #ffffff;
  --brand-surface: #F5F4FA;
  --brand-border: #C5C0ED;
  --brand-hover: #291F71;
  --brand-pressed: #1F1855;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand-surface: #161424;
    --brand-ink: #D6D3EE;
  }
}
tailwind.config.jsclick to select
theme: {
  extend: {
    colors: {
      brand: {
        50: '#F5F4FB',
        100: '#EBE9F6',
        200: '#D1CDEE',
        300: '#AFA7E7',
        400: '#867BDB',
        500: '#5E4FCE',
        600: '#4535C0',
        700: '#3A2CA0',
        800: '#33278d',
        900: '#251D5D',
        950: '#17123A',
        DEFAULT: '#33278d',
      },
    },
  },
}
scss mapclick to select
$brand: (
  '50': #F5F4FB,
  '100': #EBE9F6,
  '200': #D1CDEE,
  '300': #AFA7E7,
  '400': #867BDB,
  '500': #5E4FCE,
  '600': #4535C0,
  '700': #3A2CA0,
  '800': #33278d,
  '900': #251D5D,
  '950': #17123A,
);
$brand-base: #33278d;
$brand-ink: #ffffff;

@function brand($step) { @return map-get($brand, $step); }
w3c design tokens (json)click to select
{
  "color": {
    "brand": {
      "50": { "$value": "#F5F4FB", "$type": "color" },
      "100": { "$value": "#EBE9F6", "$type": "color" },
      "200": { "$value": "#D1CDEE", "$type": "color" },
      "300": { "$value": "#AFA7E7", "$type": "color" },
      "400": { "$value": "#867BDB", "$type": "color" },
      "500": { "$value": "#5E4FCE", "$type": "color" },
      "600": { "$value": "#4535C0", "$type": "color" },
      "700": { "$value": "#3A2CA0", "$type": "color" },
      "800": { "$value": "#33278d", "$type": "color" },
      "900": { "$value": "#251D5D", "$type": "color" },
      "950": { "$value": "#17123A", "$type": "color" }
    },
    "brandInk": { "$value": "#ffffff", "$type": "color" }
  }
}

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 #33278d · 11.57:1
Use #ffffffAAA at every size.
Aa
12px
Aa
16px
Aa
24px
Aa
White text · 11.57:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.82:1
AA fail · AA large fail · AAA fail
Reading the other direction: #33278d as text scores 11.57:1 on white and 1.82:1 on black.
Best tinted ink on it, if plain black or white feels flat: #EDEBF9 at 9.83:1.

Make it accessible

A contrast checker tells you that you failed. This tells you what to ship instead — same hue, same saturation, lightness moved only as far as WCAG demands.

The quick fox
#33278d · 11.57:1
AA on whitealready passes
#33278d
The quick fox
#33278d · 11.57:1
AAA on whitealready passes
#33278d
The quick fox
#7568D5 · 4.70:1
AA on black+27% L
#7568D5
The quick fox
#968CDF · 7.11:1
AAA on black+36% L
#968CDF

Large text — 24px regular or 18.66px bold and above — only needs 3:1, so #33278D is enough for headings on white. Non-text elements such as icons, chart strokes and focus rings also sit at 3:1 under WCAG 2.2 (1.4.11).

Accessibility — WCAG contrast

Aa
#33278d on white: 11.57:1
AA ✓ pass · AA-large · AAA
Aa
#33278d on black: 1.82:1
AA ✗ fail · AA-large · AAA
Against the neutral ladder

Contrast is symmetric, so each row covers both directions: #33278d as text on that neutral, and that neutral as text on #33278d.

NeutralRatioBoth directions
White11.57:1AaAa
Slate 5011.05:1AaAa
Slate 10010.56:1AaAa
Slate 2009.38:1AaAa
Slate 3007.79:1AaAa
Slate 4004.51:1AaAa
Slate 5002.43:1AaAa
Slate 6001.53:1AaAa
Slate 7001.12:1AaAa
Slate 8001.26:1AaAa
Slate 9001.54:1AaAa
Black1.82:1AaAa
Colour vision deficiency
true color
protanopia · #003D90
deuteranopia · #00358B
tritanopia · #004357

Roughly one man in twelve has some form of colour vision deficiency. If any of the three panels above is hard to tell apart from a neighbouring colour in your palette, add a shape, an icon or a label so the meaning does not rest on hue alone.

Color scale — 50 to 950

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

#F5F4FB
#EBE9F6
#D1CDEE
#AFA7E7
#867BDB
#5E4FCE
#4535C0
#3A2CA0
#33278d
#251D5D
#17123A
Base = 800Lightest = 50 · #F5F4FBDarkest = 950 · #17123AText step on white = 500
Perceptual ramp — OKLCH

The same eleven steps expressed in OKLCH, where equal lightness numbers actually look equally spaced. HSL ramps go muddy in the yellows and washed out in the blues; this one does not. Modern browsers render it natively — the hex ramp above is the fallback.

50100200300400500600700800900950
oklch tokensclick to select
:root {
  --brand-50: oklch(0.97 0.040 280.0);
  --brand-100: oklch(0.94 0.064 280.0);
  --brand-200: oklch(0.88 0.096 280.0);
  --brand-300: oklch(0.80 0.125 280.0);
  --brand-400: oklch(0.72 0.147 280.0);
  --brand-500: oklch(0.64 0.160 280.0);
  --brand-600: oklch(0.56 0.160 280.0);
  --brand-700: oklch(0.48 0.150 280.0);
  --brand-800: oklch(0.40 0.134 280.0);
  --brand-900: oklch(0.32 0.112 280.0);
  --brand-950: oklch(0.24 0.088 280.0);
}

Colors that work with #33278d

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#F5F4FA
Tinted page background
Border#C5C0ED
Hairlines and dividers
Muted text#544B9B
Captions on the surface
Accent#918223
Second voice, not a rival
Dark variant#241C64
Hover, pressed, headers
Light variant#EDEBF9
Selected rows, tints
Dark surface#161424
Dark-mode background
Hover#291F71
One step down in lightness
Pressed#1F1855
Two steps down
Disabled#807AAA
Chroma pulled out
Focus ring#3121A7
Offset from the fill so it reads
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

In real components

The same eight roles, wired into the interface patterns you will actually build with them. Every state below is a computed value, not a mock-up.

Buttons and states
Save changesHoverPressedDisabled
OutlineSubtleLinkFocused
Form field
you@company.com

Focus ring uses the light variant so the field still reads as one shape.

Send me product updates
Notice
Your export is ready

The file stays available for seven days. Download it before it expires.

NewBetaDraft
Data
Storage used68%
Acme LtdActive
NorthwindTrial
GlobexActive

How to use #33278d

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
Minimum size as text on white
Any size
Safe as a fill behind white type
Yes
Safe as a 1px border on white
Yes

Meaning and mood

What a colour in this family tends to signal, and how this particular chroma and lightness change the reading.

trustedcalmcompetentcorporate

The default of institutions for a reason: blue is read as stable and safe across nearly every culture that has been surveyed.

This is a confident chroma: strong enough to lead a brand, restrained enough to live in an interface all day. The low lightness adds weight and formality.

Worth knowing

It is also the most crowded hue on the web. Distinctiveness has to come from your other choices.

Reads as
  • FormalityHigh
  • EnergyMedium-high
  • Weight65/100
  • TemperatureCool
  • ApproachabilityReserved

Colour associations are cultural and vary by market. Treat these as a starting point for a conversation with your audience, not a finding about them.

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#818D27
Analogous left#274E8D
Analogous right#66278D
Split-complement 1#8D6627
Split-complement 2#4E8D27
Triadic 1#8D3327
Triadic 2#278D33
Tetradic#8D274E
On the wheel
Base+30°−30°+120°+240°+180°247°

#33278d sits at 247°. Every dot is a harmony position and links to its own page in the table alongside.

RGB percentages

Red20.0%
Green15.3%
Blue55.3%
R · 0–255
51
0x33
G · 0–255
39
0x27
B · 0–255
141
0x8d

CMYK percentages

Cyan63.8%
Magenta72.3%
Yellow0.0%
Key (black)44.7%

Total ink coverage is 181%. Most commercial presses cap around 300% — above that, sheets stop drying properly.

Color previews

#33278d text on a black background

contrast 1.82:1

Card sample

#33278d text on a white background

contrast 11.57:1

Card sample

#33278d on grey

10.56:1

#33278d on its own surface

10.58:1

#33278d on its dark surface

1.57:1

CSS3 live lab

Text font color

The quick brown fox

color: #33278d;
Background color
Panel with #33278d background
background-color: #33278d;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(51, 39, 141, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 39, 141, 0.45);
Border & gradient
Gradient panel
border: 3px solid #33278d;
background: linear-gradient(135deg, #33278d, #77278D);
Gradient text

Gradient headline

background: linear-gradient(90deg, #33278d, #8D2789);
-webkit-background-clip: text;
color: transparent;
Focus ring
Focused control
outline: 2px solid #33278d;
outline-offset: 3px;
Underline & caret

Marked up text

text-decoration-color: #33278d;
caret-color: #33278d;
Left rule
Pull quote or callout
border-left: 4px solid #33278d;
Ring + tint
Selected chip
background: #EDEBF9;
box-shadow: inset 0 0 0 2px #33278d;
Conic badge
68%
background: conic-gradient(#33278d 68%, #e2e8f0 0);

Transparency

What each alpha value actually composites to. The top row is #33278d over white; the bottom row is the same alpha over a checkerboard, so you can see what survives on a photo or a video.

Bottom row of hexes is the flattened result over white — use those when a design tool refuses transparency, or when you need a solid fallback.

alpha in every syntaxclick to select
rgba(51, 39, 141, 0.5)
rgb(51 39 141 / 50%)
#33278d80
hsl(247 57% 35% / 50%)
color-mix(in srgb, #33278d 50%, transparent)
Alpha8-digit hexFlat on white
10%#33278d1a#EBE9F4
20%#33278d33#D6D4E8
40%#33278d66#ADA9D1
60%#33278d99#857DBB
80%#33278dcc#5C52A4

Gradients from #33278d

Six recipes, each built from this hex and shown with the exact CSS that produced it.

Elevation
Same hue, three lightnesses — safe anywhere
background: linear-gradient(135deg, #4434BD, #33278d 45%, #241C64);
Duotone
A short hue run reads richer than a flat fill
background: linear-gradient(120deg, #33278d, #6A2075);
Complement sweep
Loud — keep it behind large type only
background: linear-gradient(90deg, #33278d, #818D27);
Spotlight
Hero panels and app headers
background: radial-gradient(120% 120% at 20% 0%, #5444CB 0%, #33278d 45%, #241C64 100%);
Soft wash
Section backgrounds that stay readable
background: linear-gradient(180deg, #F5F4FA, #ffffff);
Mesh
Ambient background, no image weight
background: radial-gradient(60% 60% at 15% 20%, #326FB5 0%, transparent 60%), radial-gradient(55% 55% at 85% 15%, #812EA5 0%, transparent 60%), radial-gradient(70% 70% at 50% 95%, #241C64 0%, transparent 65%), #33278d;

Monochromatic scale

Palettes built from #33278d

Shades — darker

Tints — lighter

Tones — desaturated

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.

#33278d in the real world

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

Industries
TechnologyFinanceHealthcareEnterprise SaaS
Common UI roles
ButtonsLinksFocus statesCharts
Print note

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

On screens

Very dark values collapse into each other on cheap panels — leave more lightness between your darkest steps than the numbers suggest.

In dark mode

Too dim on dark surfaces at 1.82:1 — lift it to #7568D5 for body text, or reserve it for fills.

Explore nearby colors

Small, deliberate steps away from this hex — useful when you are hunting for the version of a colour that finally feels right.

#33278d, answered

What color is #33278d?

#33278d is a dark vivid blue, closest to Midnight Blue (ΔE2000 5.8). It sits at 247° on the hue wheel with 57% saturation and 35% lightness, which reads as cool.

What is the RGB value of #33278d?

rgb(51, 39, 141) — 51 red, 39 green and 141 blue out of 255, or 20% / 15.3% / 55.3% by channel.

What is #33278d in HSL and HSV?

hsl(247, 57%, 35%) and hsv(247, 72%, 55%). HSL is what CSS takes; HSV is what your design tool's picker shows, which is why the saturation numbers rarely match.

Is #33278d a light or a dark color?

It is a dark color. Relative luminance is 0.0408 and perceived brightness is 25%, so white text on it reaches 11.57:1.

Should I use black or white text on #33278d?

White. It scores 11.57:1 against #33278d, versus 1.82:1 for black — AAA at any size.

Is #33278d accessible on a white background?

#33278d on white scores 11.57:1, which clears AAA at every size.

What is the complementary color of #33278d?

#818D27 sits directly opposite on the wheel. Softer options are the split-complements #8D6627 and #4E8D27, which give the same contrast with far less vibration.

What colors go well with #33278d?

For interface work: #F5F4FA as the surface, #C5C0ED for borders, #544B9B for secondary text, #918223 as an accent and #241C64 for hover and pressed states. For a palette, the analogous pair #274E8D and #66278D stays calm, while #818D27 is the loudest partner.

What is #33278d in CMYK for printing?

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

Is #33278d warm or cool?

Cool — it scores 79 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #58278D; nudged cooler, #253F8F.

Which Tailwind color is closest to #33278d?

The indigo family — its 500 step is #6366f1, ΔE2000 23 away. That is a visible difference, so define #33278d as a custom token rather than reaching for the built-in.

How do I use #33278d in Tailwind CSS?

Inline it as an arbitrary value with bg-[#33278d] or text-[#33278d], or register the whole ramp under theme.extend.colors.brand so you get bg-brand-500 and friends. The generated 50–950 scale on this page is ready to paste into your config.

What is #33278d with 50% opacity?

rgba(51, 39, 141, 0.5), or #33278d80 in eight-digit hex. Over white that composites to #9993C6; over black, #1A1447.

Is #33278d a web-safe color?

No. The nearest web-safe colour is #333399, ΔE2000 3.6 away. The palette only matters for legacy displays and some email clients now.

What does the color #33278d mean?

As a blue, it reads trusted, calm, competent. The default of institutions for a reason: blue is read as stable and safe across nearly every culture that has been surveyed. At this chroma the effect is amplified — it will dominate whatever sits beside it.

What gradient works with #33278d?

The safest is same-hue elevation: linear-gradient(135deg, #4434BD, #33278d 45%, #241C64). For more colour, a short hue run to #6A2075 keeps it rich without turning muddy.

Work with #33278d in the Color Lab

Every tool opens with this colour already loaded.

Every value on this page is computed from #33278d at request time — conversions, contrast ratios and ΔE distances are calculated, never looked up.