CSS named color
RebeccaPurple #663399
RebeccaPurple (CSS keyword rebeccapurple) has the hex code #663399 and the RGB value rgb(102, 51, 153): a dark, vivid violet.
Added in CSS Color Level 4 in 2014 in memory of Rebecca Meyer, the daughter of CSS author Eric Meyer, who died on her sixth birthday; purple was her favorite color. It is the only addition to the list since CSS Color Level 3 adopted the SVG color names.
Color codes for RebeccaPurple
| CSS keyword | rebeccapurple |
|---|---|
| HEX | #663399 |
| RGB | rgb(102, 51, 153) |
| HSL | hsl(270, 50%, 40%) |
| HWB | hwb(270 20% 40%) |
| OKLCH | oklch(44% 0.16 303.4) |
| CMYK (naive, no ICC profile) | cmyk(33%, 67%, 0%, 40%) |
| Decimal | 6,697,881 |
| Hue family | Purples and violets |
Contrast and accessibility
On rebeccapurple, white text has a contrast ratio of 8.40:1 and passes AAA at any text size; black text reaches 2.49:1.
WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on rebeccapurple | 2.49:1 | Fail | Fail | Fail | Fail | 15.6 |
| White text on rebeccapurple | 8.40:1 | Pass | Pass | Pass | Pass | −93.0 |
| Rebeccapurple text on white | 8.40:1 | Pass | Pass | Pass | Pass | 88.4 |
| Rebeccapurple text on black | 2.49:1 | Fail | Fail | Fail | Fail | −13.8 |
Tints and shades
Each step mixes rebeccapurple with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, rebeccapurple, white 25%) in CSS.
Tints (mixed with white)
- 5%
#6e3d9e - 15%
#7d52a8 - 25%
#8c66b3 - 35%
#9c7abd - 45%
#ab8fc7 - 55%
#baa3d1 - 65%
#c9b8db - 75%
#d9cce6 - 85%
#e8e0f0 - 95%
#f7f5fa
Shades (mixed with black)
- 5%
#613091 - 15%
#572b82 - 25%
#4d2673 - 35%
#422163 - 45%
#381c54 - 55%
#2e1745 - 65%
#241236 - 75%
#1a0d26 - 85%
#0f0817 - 95%
#050308
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, rebeccapurple's complementary color is #455D00 (close to darkgreen), its analogous colors are #3A44A9 and #832477, and its triadic partners are #7F4000 and #006358. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #455d00 |
| Analogous | −30°, +30° | #3a44a9#832477 |
| Triadic | +120°, +240° | #7f4000#006358 |
| Split-complementary | +150°, +210° | #675000#006729 |
Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.
Warm or cool?
RebeccaPurple is a cool color: its hue is 270° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
Nearest named and Tailwind colors
Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.
Nearest CSS named colors
| Color | HEX | ΔE OK |
|---|---|---|
| darkslateblue | #483d8b | 6.1 |
| purple | #800080 | 8.5 |
| darkmagenta | #8b008b | 9.1 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| purple-800 | #6e11b0 | 5.8 |
| purple-900 | #59168b | 6.1 |
| violet-900 | #4d179a | 7.3 |
Code snippets
.element {
color: rebeccapurple;
background-color: #663399;
border-color: rgb(102 51 153);
outline-color: oklch(44% 0.16 303.4);
}<div class="bg-[#663399] text-white">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-rebeccapurple: #663399;
}
/* then use bg-rebeccapurple, text-rebeccapurple, border-rebeccapurple */import SwiftUI
extension Color {
static let rebeccapurple = Color(red: 0.400, green: 0.200, blue: 0.600)
}import androidx.compose.ui.graphics.Color
val Rebeccapurple = Color(0xFF663399)import 'package:flutter/material.dart';
const rebeccapurple = Color(0xFF663399);<!-- res/values/colors.xml -->
<color name="rebeccapurple">#663399</color>Frequently asked questions
- What is the hex code for rebeccapurple?
- The hex code for rebeccapurple is #663399. The same color is rgb(102, 51, 153), hsl(270, 50%, 40%) and oklch(44% 0.16 303.4), and in CSS you can also write the keyword rebeccapurple directly.
- Is rebeccapurple a warm or cool color?
- RebeccaPurple is a cool color: its hue is 270° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
- What colors go with rebeccapurple?
- Rotating the hue in OKLCH while keeping lightness and chroma, rebeccapurple's complementary color is #455D00 (close to darkgreen), its analogous colors are #3A44A9 and #832477, and its triadic partners are #7F4000 and #006358. For text on top, white gives the higher contrast.
- Can you use white text on rebeccapurple?
- White text on rebeccapurple has a contrast ratio of 8.40:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 2.49:1 and fails AA even for large text. In APCA terms that is Lc −93.0 for white and Lc 15.6 for black.
- What is the RGB value of rebeccapurple?
- RebeccaPurple is rgb(102, 51, 153): red 102, green 51 and blue 153 on the 0 to 255 scale, or 40.0%, 20.0% and 60.0%. As a decimal integer it is 6697881.
Last reviewed by Arielton Oberek.