Skip to content

#335aaa

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

RGB
51, 90, 170
HSL
220°, 54%, 43%
CMYK
70, 47, 0, 33
Luminance
0.1092

At a glance

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

Hex
#335aaa
Hue
220°
blue
Saturation
54%
vivid
Lightness
43%
dark
Brightness
67%
HSV value
Perceived
37%
weighted brightness
Luminance
0.1092
WCAG relative
Temperature
Cool
94/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
6.60:1
Closest name
Royal Blue
ΔE2000 8.8
Where it sits
Hue220° of 360°
Saturation54%
Lightness43%
Temperature
Warm ← → Cool94% 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#335aaa
RGBrgb(51, 90, 170)
HSLhsl(220, 54%, 43%)
CMYKcmyk(70%, 47%, 0%, 33%)
LABlab(39.4 13.8 -47.0)
LCHlch(39.4 49.0 286.3)
OKLCHoklch(0.482 0.136 262.8)
Decimal3365546
Display P3color(display-p3 0.200 0.353 0.667)

Copy-ready code

/* CSS */
color: #335aaa;
background-color: #335aaa;
/* Tailwind (arbitrary) */
class="text-[#335aaa] bg-[#335aaa]"
/* SCSS */
$brand: #335aaa;
/* SwiftUI */
Color(red: 0.200, green: 0.353, blue: 0.667)
/* Android */
Color.parseColor("#335aaa")
/* Flutter */
Color(0xFF335AAA)
/* Python / OpenCV (BGR) */
(170, 90, 51)

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 #335aaa · 6.60:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 6.60:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.18:1
AA fail · AA large pass · AAA fail
Reading the other direction: #335aaa as text scores 6.60:1 on white and 3.18:1 on black.

Accessibility — WCAG contrast

Aa
#335aaa on white: 6.60:1
AA ✓ pass · AA-large · AAA
Aa
#335aaa on black: 3.18:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #3163AD
deuteranopia · #1758A8
tritanopia · #006D7A

Color scale — 50 to 950

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

#F4F6FB
#E9EDF6
#CED8EE
#A9BDE5
#7E9BD8
#527ACB
#3964BC
#335aaa
#26437E
#1F335B
#132039
Base = 700Lightest = 50 · #F4F6FBDarkest = 950 · #132039
:root {
  --brand-50: #F4F6FB;
  --brand-100: #E9EDF6;
  --brand-200: #CED8EE;
  --brand-300: #A9BDE5;
  --brand-400: #7E9BD8;
  --brand-500: #527ACB;
  --brand-600: #3964BC;
  --brand-700: #335aaa;
  --brand-800: #26437E;
  --brand-900: #1F335B;
  --brand-950: #132039;
  --brand: #335aaa;
  --brand-ink: #ffffff;
}

Colors that work with #335aaa

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#F4F6FA
Tinted page background
Border#C0CFEC
Hairlines and dividers
Muted text#4B659B
Captions on the surface
Accent#AE642F
Second voice, not a rival
Dark variant#1D3462
Hover, pressed, headers
Light variant#EBF0F9
Selected rows, tints
Dark surface#141924
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 #335aaa

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
  • 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#AA8333
Analogous left#3395AA
Analogous right#4733AA
Split-complement 1#AA4733
Split-complement 2#95AA33
Triadic 1#AA335A
Triadic 2#5AAA33
Tetradic#AA3395

RGB percentages

Red20.0%
Green35.3%
Blue66.7%

CMYK percentages

Cyan70.0%
Magenta47.1%
Yellow0.0%
Key (black)33.3%

Color previews

#335aaa text on a black background

contrast 3.18:1

Card sample

#335aaa text on a white background

contrast 6.60:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #335aaa;
Background color
Panel with #335aaa background
background-color: #335aaa;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(51, 90, 170, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 90, 170, 0.45);
Border & gradient
Gradient panel
border: 3px solid #335aaa;
background: linear-gradient(135deg, #335aaa, #5B33AA);

Monochromatic scale

Palettes built from #335aaa

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.

#335aaa 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.

#335aaa, answered

What color is #335aaa?

#335aaa is a dark vivid blue, closest to Royal Blue (ΔE2000 8.8). It sits at 220° on the hue wheel with 54% saturation and 43% lightness, which reads as cool.

What is the RGB value of #335aaa?

rgb(51, 90, 170) — 51 red, 90 green and 170 blue out of 255, or 20% / 35.3% / 66.7% by channel.

Is #335aaa a light or a dark color?

It is a dark color. Relative luminance is 0.1092 and perceived brightness is 37%, so white text on it reaches 6.60:1.

Should I use black or white text on #335aaa?

White. It scores 6.60:1 against #335aaa, versus 3.18:1 for black — AA at any size.

What is the complementary color of #335aaa?

#AA8333 sits directly opposite on the wheel. Softer options are the split-complements #AA4733 and #95AA33, which give the same contrast with far less vibration.

What colors go well with #335aaa?

For interface work: #F4F6FA as the surface, #C0CFEC for borders, #4B659B for secondary text, #AE642F as an accent and #1D3462 for hover and pressed states. For a palette, the analogous pair #3395AA and #4733AA stays calm, while #AA8333 is the loudest partner.

What is #335aaa in CMYK for printing?

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

Is #335aaa warm or cool?

Cool — it scores 94 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #3833AA; nudged cooler, #2B5998.

Work with #335aaa in the Color Lab