CSS named color
MediumOrchid #BA55D3
MediumOrchid (CSS keyword mediumorchid) has the hex code #BA55D3 and the RGB value rgb(186, 85, 211): a medium, vivid purple.
A medium purple-pink (#ba55d3), more saturated than orchid and lighter than darkorchid. Works as a playful accent.
Color codes for MediumOrchid
| CSS keyword | mediumorchid |
|---|---|
| HEX | #BA55D3 |
| RGB | rgb(186, 85, 211) |
| HSL | hsl(288, 59%, 58%) |
| HWB | hwb(288 33% 17%) |
| OKLCH | oklch(62.6% 0.202 319.2) |
| CMYK (naive, no ICC profile) | cmyk(12%, 60%, 0%, 17%) |
| Decimal | 12,211,667 |
| Hue family | Purples and violets |
Contrast and accessibility
On mediumorchid, black text has a contrast ratio of 5.32:1 and passes AA for normal text; white text reaches 3.94: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 mediumorchid | 5.32:1 | Pass | Pass | Fail | Pass | 37.9 |
| White text on mediumorchid | 3.94:1 | Fail | Pass | Fail | Fail | −71.7 |
| Mediumorchid text on white | 3.94:1 | Fail | Pass | Fail | Fail | 66.2 |
| Mediumorchid text on black | 5.32:1 | Pass | Pass | Fail | Pass | −35.5 |
Tints and shades
Each step mixes mediumorchid with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, mediumorchid, white 25%) in CSS.
Tints (mixed with white)
- 5%
#bd5ed5 - 15%
#c46fda - 25%
#cb80de - 35%
#d291e2 - 45%
#d9a2e7 - 55%
#e0b3eb - 65%
#e7c4f0 - 75%
#eed5f4 - 85%
#f5e6f8 - 95%
#fcf7fd
Shades (mixed with black)
- 5%
#b151c8 - 15%
#9e48b3 - 25%
#8c409e - 35%
#793789 - 45%
#662f74 - 55%
#54265f - 65%
#411e4a - 75%
#2f1535 - 85%
#1c0d20 - 95%
#09040b
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, mediumorchid's complementary color is #35A200 (close to forestgreen), its analogous colors are #896AF7 and #DA459A, and its triadic partners are #B77A00 and #009EA5. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #35a200 |
| Analogous | −30°, +30° | #896af7#da459a |
| Triadic | +120°, +240° | #b77a00#009ea5 |
| Split-complementary | +150°, +210° | #908e00#00a379 |
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?
MediumOrchid is a cool color: its hue is 288° 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 |
|---|---|---|
| mediumpurple | #9370db | 8.3 |
| orchid | #da70d6 | 8.6 |
| darkorchid | #9932cc | 9.3 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| purple-500 | #ad46ff | 8.8 |
| fuchsia-600 | #c800de | 9.8 |
| purple-400 | #c27aff | 10.1 |
Code snippets
.element {
color: mediumorchid;
background-color: #ba55d3;
border-color: rgb(186 85 211);
outline-color: oklch(62.6% 0.202 319.2);
}<div class="bg-[#ba55d3] text-black">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-mediumorchid: #ba55d3;
}
/* then use bg-mediumorchid, text-mediumorchid, border-mediumorchid */import SwiftUI
extension Color {
static let mediumorchid = Color(red: 0.729, green: 0.333, blue: 0.827)
}import androidx.compose.ui.graphics.Color
val Mediumorchid = Color(0xFFBA55D3)import 'package:flutter/material.dart';
const mediumorchid = Color(0xFFBA55D3);<!-- res/values/colors.xml -->
<color name="mediumorchid">#BA55D3</color>Frequently asked questions
- What is the hex code for mediumorchid?
- The hex code for mediumorchid is #BA55D3. The same color is rgb(186, 85, 211), hsl(288, 59%, 58%) and oklch(62.6% 0.202 319.2), and in CSS you can also write the keyword mediumorchid directly.
- Is mediumorchid a warm or cool color?
- MediumOrchid is a cool color: its hue is 288° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
- What colors go with mediumorchid?
- Rotating the hue in OKLCH while keeping lightness and chroma, mediumorchid's complementary color is #35A200 (close to forestgreen), its analogous colors are #896AF7 and #DA459A, and its triadic partners are #B77A00 and #009EA5. For text on top, black gives the higher contrast.
- Can you use white text on mediumorchid?
- White text on mediumorchid has a contrast ratio of 3.94:1, which passes AA only for large text (24 px, or 18.66 px bold, and up) under WCAG 2.2. Black text reaches 5.32:1 and passes AA for normal text but not AAA. In APCA terms that is Lc −71.7 for white and Lc 37.9 for black.
- What is the RGB value of mediumorchid?
- MediumOrchid is rgb(186, 85, 211): red 186, green 85 and blue 211 on the 0 to 255 scale, or 72.9%, 33.3% and 82.7%. As a decimal integer it is 12211667.
Last reviewed by Arielton Oberek.