#af74e2
a light, vivid violet · cool · closest name: Medium Purple
At a glance
Every number on this page in one read: what #af74e2 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 | #af74e2 |
| RGB | rgb(175, 116, 226) |
| HSL | hsl(272, 66%, 67%) |
| CMYK | cmyk(23%, 49%, 0%, 11%) |
| LAB | lab(59.1 43.7 -47.4) |
| LCH | lch(59.1 64.4 312.7) |
| OKLCH | oklch(0.665 0.166 307.2) |
| Decimal | 11498722 |
| Display P3 | color(display-p3 0.686 0.455 0.886) |
Copy-ready code
/* CSS */
color: #af74e2;
background-color: #af74e2;
/* Tailwind (arbitrary) */
class="text-[#af74e2] bg-[#af74e2]"
/* SCSS */
$brand: #af74e2;
/* SwiftUI */
Color(red: 0.686, green: 0.455, blue: 0.886)
/* Android */
Color.parseColor("#af74e2")
/* Flutter */
Color(0xFFAF74E2)
/* Python / OpenCV (BGR) */
(226, 116, 175)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. #af74e2 is pinned to step 400; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.
:root {
--brand-50: #F8F3FB;
--brand-100: #F0E8F8;
--brand-200: #DFCBF1;
--brand-300: #CAA2EC;
--brand-400: #af74e2;
--brand-500: #9445D8;
--brand-600: #802ACB;
--brand-700: #6B23A9;
--brand-800: #561C87;
--brand-900: #401862;
--brand-950: #280F3D;
--brand: #af74e2;
--brand-ink: #000000;
}Colors that work with #af74e2
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 #af74e2
Derived from its contrast, chroma and lightness — not from taste.
- ✓Headings from 24px up on white
- ✓Text and icons on dark surfaces
- ✓Primary buttons and calls to action
- ✓Focus rings, active and selected states
- ✓Card and section backgrounds
- ✓Brand accents, badges and data highlights
- ⚠Small text on white — under 4.5:1
- ⚠Full-page backgrounds — tiring over long sessions
- ⚠White 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 | #A7E274 | Directly opposite — maximum tension | |
| Analogous left | #7874E2 | Neighbour, quieter | |
| Analogous right | #E274DE | Neighbour, quieter | |
| Split-complement 1 | #DEE274 | Contrast without the clash | |
| Split-complement 2 | #74E278 | Contrast without the clash | |
| Triadic 1 | #E2AF74 | Even thirds — balanced and loud | |
| Triadic 2 | #74E2AF | Even thirds — balanced and loud | |
| Tetradic | #E27874 | Fourth corner of the square scheme |
RGB percentages
CMYK percentages
Color previews
#af74e2 text on a black background
contrast 6.42:1
#af74e2 text on a white background
contrast 3.27:1
CSS3 live lab
The quick brown fox
color: #af74e2;
background-color: #af74e2;
Glowing headline
text-shadow: 2px 2px 8px #af74e2;
Soft neon halo
text-shadow: 0 0 14px rgba(175, 116, 226, 0.45);
box-shadow: 0 12px 32px -8px rgba(175, 116, 226, 0.45);
border: 3px solid #af74e2; background: linear-gradient(135deg, #af74e2, #E274CC);
Monochromatic scale
Palettes built from #af74e2
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: Orchid (#da70d6) — ΔE2000 9.3 away, with its history, psychology and brand usage.
#af74e2 in the real world
Where a color in this family tends to land, and the interface roles it is usually asked to play.
Converts to four-color process without much drama. Proof it anyway.
#af74e2, answered
What color is #af74e2?
#af74e2 is a light vivid violet, closest to Medium Purple (ΔE2000 5.7). It sits at 272° on the hue wheel with 66% saturation and 67% lightness, which reads as cool.
What is the RGB value of #af74e2?
rgb(175, 116, 226) — 175 red, 116 green and 226 blue out of 255, or 68.6% / 45.5% / 88.6% by channel.
Is #af74e2 a light or a dark color?
It is a mid-tone. Relative luminance is 0.2710 and perceived brightness is 59%, so black text on it reaches 6.42:1.
Should I use black or white text on #af74e2?
Black. It scores 6.42:1 against #af74e2, versus 3.27:1 for white — AA at any size.
What is the complementary color of #af74e2?
#A7E274 sits directly opposite on the wheel. Softer options are the split-complements #DEE274 and #74E278, which give the same contrast with far less vibration.
What colors go well with #af74e2?
For interface work: #F8F4FA as the surface, #D8C0ED for borders, #764B9B for secondary text, #84AC20 as an accent and #43166A for hover and pressed states. For a palette, the analogous pair #7874E2 and #E274DE stays calm, while #A7E274 is the loudest partner.
What is #af74e2 in CMYK for printing?
cmyk(23%, 49%, 0%, 11%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.
Is #af74e2 warm or cool?
Cool — it scores 65 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #D774E2; nudged cooler, #8672E4.