Skip to content

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.

MediumOrchid#BA55D3

A medium purple-pink (#ba55d3), more saturated than orchid and lighter than darkorchid. Works as a playful accent.

Color codes for MediumOrchid

Color codes for MediumOrchid
CSS keywordmediumorchid
HEX#BA55D3
RGBrgb(186, 85, 211)
HSLhsl(288, 59%, 58%)
HWBhwb(288 33% 17%)
OKLCHoklch(62.6% 0.202 319.2)
CMYK (naive, no ICC profile)cmyk(12%, 60%, 0%, 17%)
Decimal12,211,667
Hue familyPurples 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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on mediumorchid5.32:1PassPassFailPass37.9
White text on mediumorchid3.94:1FailPassFailFail−71.7
Mediumorchid text on white3.94:1FailPassFailFail66.2
Mediumorchid text on black5.32:1PassPassFailPass−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)

  1. 5%
    #bd5ed5
  2. 15%
    #c46fda
  3. 25%
    #cb80de
  4. 35%
    #d291e2
  5. 45%
    #d9a2e7
  6. 55%
    #e0b3eb
  7. 65%
    #e7c4f0
  8. 75%
    #eed5f4
  9. 85%
    #f5e6f8
  10. 95%
    #fcf7fd

Shades (mixed with black)

  1. 5%
    #b151c8
  2. 15%
    #9e48b3
  3. 25%
    #8c409e
  4. 35%
    #793789
  5. 45%
    #662f74
  6. 55%
    #54265f
  7. 65%
    #411e4a
  8. 75%
    #2f1535
  9. 85%
    #1c0d20
  10. 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.

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

Nearest CSS named colors
ColorHEXΔE OK
mediumpurple#9370db8.3
orchid#da70d68.6
darkorchid#9932cc9.3

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
purple-500#ad46ff8.8
fuchsia-600#c800de9.8
purple-400#c27aff10.1

Code snippets

CSS
.element {
  color: mediumorchid;
  background-color: #ba55d3;
  border-color: rgb(186 85 211);
  outline-color: oklch(62.6% 0.202 319.2);
}
Tailwind CSS
<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 */
SwiftUI
import SwiftUI

extension Color {
  static let mediumorchid = Color(red: 0.729, green: 0.333, blue: 0.827)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

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