Skip to content

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.

RebeccaPurple#663399

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

Color codes for RebeccaPurple
CSS keywordrebeccapurple
HEX#663399
RGBrgb(102, 51, 153)
HSLhsl(270, 50%, 40%)
HWBhwb(270 20% 40%)
OKLCHoklch(44% 0.16 303.4)
CMYK (naive, no ICC profile)cmyk(33%, 67%, 0%, 40%)
Decimal6,697,881
Hue familyPurples 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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on rebeccapurple2.49:1FailFailFailFail15.6
White text on rebeccapurple8.40:1PassPassPassPass−93.0
Rebeccapurple text on white8.40:1PassPassPassPass88.4
Rebeccapurple text on black2.49:1FailFailFailFail−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)

  1. 5%
    #6e3d9e
  2. 15%
    #7d52a8
  3. 25%
    #8c66b3
  4. 35%
    #9c7abd
  5. 45%
    #ab8fc7
  6. 55%
    #baa3d1
  7. 65%
    #c9b8db
  8. 75%
    #d9cce6
  9. 85%
    #e8e0f0
  10. 95%
    #f7f5fa

Shades (mixed with black)

  1. 5%
    #613091
  2. 15%
    #572b82
  3. 25%
    #4d2673
  4. 35%
    #422163
  5. 45%
    #381c54
  6. 55%
    #2e1745
  7. 65%
    #241236
  8. 75%
    #1a0d26
  9. 85%
    #0f0817
  10. 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.

Color harmonies
HarmonyRotationColor
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

Nearest CSS named colors
ColorHEXΔE OK
darkslateblue#483d8b6.1
purple#8000808.5
darkmagenta#8b008b9.1

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
purple-800#6e11b05.8
purple-900#59168b6.1
violet-900#4d179a7.3

Code snippets

CSS
.element {
  color: rebeccapurple;
  background-color: #663399;
  border-color: rgb(102 51 153);
  outline-color: oklch(44% 0.16 303.4);
}
Tailwind CSS
<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 */
SwiftUI
import SwiftUI

extension Color {
  static let rebeccapurple = Color(red: 0.400, green: 0.200, blue: 0.600)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Rebeccapurple = Color(0xFF663399)
Flutter
import 'package:flutter/material.dart';

const rebeccapurple = Color(0xFF663399);
Android XML
<!-- 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.