#4f04cd
a dark, electric violet · cool · closest name: Medium Blue
At a glance
Every number on this page in one read: what #4f04cd is made of, how bright it looks, and which way it leans.
Reads cool. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.
Every format
| HEX | #4f04cd |
| RGB | rgb(79, 4, 205) |
| HSL | hsl(262, 96%, 41%) |
| CMYK | cmyk(62%, 98%, 0%, 20%) |
| LAB | lab(29.8 68.4 -83.3) |
| LCH | lch(29.8 107.8 309.4) |
| OKLCH | oklch(0.427 0.248 284.7) |
| Decimal | 5178573 |
| Display P3 | color(display-p3 0.310 0.016 0.804) |
Copy-ready code
/* CSS */
color: #4f04cd;
background-color: #4f04cd;
/* Tailwind (arbitrary) */
class="text-[#4f04cd] bg-[#4f04cd]"
/* SCSS */
$brand: #4f04cd;
/* SwiftUI */
Color(red: 0.310, green: 0.016, blue: 0.804)
/* Android */
Color.parseColor("#4f04cd")
/* Flutter */
Color(0xFF4F04CD)
/* Python / OpenCV (BGR) */
(205, 4, 79)Best text color
Only one of black and white can be right. This is the one, with the number that proves it.
Accessibility — WCAG contrast
Color scale — 50 to 950
A Tailwind-shaped ramp built around this exact hex. #4f04cd 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.
:root {
--brand-50: #F6F1FD;
--brand-100: #EDE4FC;
--brand-200: #D7C1FA;
--brand-300: #B991FD;
--brand-400: #965AFC;
--brand-500: #7323FB;
--brand-600: #5D05F0;
--brand-700: #4f04cd;
--brand-800: #3E03A0;
--brand-900: #2F0773;
--brand-950: #1E0448;
--brand: #4f04cd;
--brand-ink: #ffffff;
}Colors that work with #4f04cd
Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.
Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.
Lightness flips, hue holds. The accent stays the anchor in both themes.
How to use #4f04cd
Derived from its contrast, chroma and lightness — not from taste.
- ✓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
- ⚠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 | #82CD04 | Directly opposite — maximum tension | |
| Analogous left | #041DCD | Neighbour, quieter | |
| Analogous right | #B404CD | Neighbour, quieter | |
| Split-complement 1 | #CDB404 | Contrast without the clash | |
| Split-complement 2 | #1DCD04 | Contrast without the clash | |
| Triadic 1 | #CD4F04 | Even thirds — balanced and loud | |
| Triadic 2 | #04CD4F | Even thirds — balanced and loud | |
| Tetradic | #CD041D | Fourth corner of the square scheme |
RGB percentages
CMYK percentages
Color previews
#4f04cd text on a black background
contrast 2.23:1
#4f04cd text on a white background
contrast 9.41:1
CSS3 live lab
The quick brown fox
color: #4f04cd;
background-color: #4f04cd;
Glowing headline
text-shadow: 2px 2px 8px #4f04cd;
Soft neon halo
text-shadow: 0 0 14px rgba(79, 4, 205, 0.45);
box-shadow: 0 12px 32px -8px rgba(79, 4, 205, 0.45);
border: 3px solid #4f04cd; background: linear-gradient(135deg, #4f04cd, #CD04C5);
Monochromatic scale
Palettes built from #4f04cd
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.
Closest color with a full write-up: Ultramarine (#3f00ff) — ΔE2000 5.7 away, with its history, psychology and brand usage.
#4f04cd in the real world
Where a color in this family tends to land, and the interface roles it is usually asked to play.
Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.
#4f04cd, answered
What color is #4f04cd?
#4f04cd is a dark electric violet, closest to Medium Blue (ΔE2000 4.9). It sits at 262° on the hue wheel with 96% saturation and 41% lightness, which reads as cool.
What is the RGB value of #4f04cd?
rgb(79, 4, 205) — 79 red, 4 green and 205 blue out of 255, or 31% / 1.6% / 80.4% by channel.
Is #4f04cd a light or a dark color?
It is a dark color. Relative luminance is 0.0616 and perceived brightness is 32%, so white text on it reaches 9.41:1.
Should I use black or white text on #4f04cd?
White. It scores 9.41:1 against #4f04cd, versus 2.23:1 for black — AAA at any size.
What is the complementary color of #4f04cd?
#82CD04 sits directly opposite on the wheel. Softer options are the split-complements #CDB404 and #1DCD04, which give the same contrast with far less vibration.
What colors go well with #4f04cd?
For interface work: #F7F4FA as the surface, #D1C0ED for borders, #694B9B for secondary text, #B3CC00 as an accent and #30027D for hover and pressed states. For a palette, the analogous pair #041DCD and #B404CD stays calm, while #82CD04 is the loudest partner.
What is #4f04cd in CMYK for printing?
cmyk(62%, 98%, 0%, 20%). 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 #4f04cd warm or cool?
Cool — it scores 71 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #9904CD; nudged cooler, #0302CF.