Skip to content

CSS named color

SlateBlue #6A5ACD

SlateBlue (CSS keyword slateblue) has the hex code #6A5ACD and the RGB value rgb(106, 90, 205): a medium-dark, vivid blue-violet.

SlateBlue#6A5ACD

A medium blue-violet (#6a5acd), named after the bluish tone of slate. It sits between mediumslateblue and darkslateblue.

Color codes for SlateBlue

Color codes for SlateBlue
CSS keywordslateblue
HEX#6A5ACD
RGBrgb(106, 90, 205)
HSLhsl(248, 53%, 58%)
HWBhwb(248 35% 20%)
OKLCHoklch(54.4% 0.171 285.5)
CMYK (naive, no ICC profile)cmyk(48%, 56%, 0%, 20%)
Decimal6,970,061
Hue familyPurples and violets

Contrast and accessibility

On slateblue, white text has a contrast ratio of 5.30:1 and passes AA for normal text; black text reaches 3.95: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 slateblue3.95:1FailPassFailFail28.0
White text on slateblue5.30:1PassPassFailPass−81.4
Slateblue text on white5.30:1PassPassFailPass76.1
Slateblue text on black3.95:1FailPassFailFail−25.7

Tints and shades

Each step mixes slateblue with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, slateblue, white 25%) in CSS.

Tints (mixed with white)

  1. 5%
    #7162d0
  2. 15%
    #8073d5
  3. 25%
    #8f83da
  4. 35%
    #9e94df
  5. 45%
    #ada4e4
  6. 55%
    #bcb5e9
  7. 65%
    #cbc5ee
  8. 75%
    #dad6f3
  9. 85%
    #e9e6f8
  10. 95%
    #f8f7fd

Shades (mixed with black)

  1. 5%
    #6556c3
  2. 15%
    #5a4dae
  3. 25%
    #50449a
  4. 35%
    #453b85
  5. 45%
    #3a3271
  6. 55%
    #30285c
  7. 65%
    #251f48
  8. 75%
    #1b1733
  9. 85%
    #100e1f
  10. 95%
    #05050a

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, slateblue's complementary color is #7C7300 (close to olive), its analogous colors are #156DD0 and #9549B2, and its triadic partners are #BB4300 and #00885C. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#7c7300
Analogous−30°, +30°#156dd0#9549b2
Triadic+120°, +240°#bb4300#00885c
Split-complementary+150°, +210°#9b6200#3c8400

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?

SlateBlue is a cool color: its hue is 248° 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
royalblue#4169e16.4
mediumslateblue#7b68ee6.5
mediumpurple#9370db9.0

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
indigo-500#615fff8.0
indigo-600#4f39f610.2
violet-500#8e51ff10.4

Code snippets

CSS
.element {
  color: slateblue;
  background-color: #6a5acd;
  border-color: rgb(106 90 205);
  outline-color: oklch(54.4% 0.171 285.5);
}
Tailwind CSS
<div class="bg-[#6a5acd] text-white">...</div>

/* or register it once in your CSS (Tailwind v4) */
@theme {
  --color-slateblue: #6a5acd;
}
/* then use bg-slateblue, text-slateblue, border-slateblue */
SwiftUI
import SwiftUI

extension Color {
  static let slateblue = Color(red: 0.416, green: 0.353, blue: 0.804)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const slateblue = Color(0xFF6A5ACD);
Android XML
<!-- res/values/colors.xml -->
<color name="slateblue">#6A5ACD</color>

Frequently asked questions

What is the hex code for slateblue?
The hex code for slateblue is #6A5ACD. The same color is rgb(106, 90, 205), hsl(248, 53%, 58%) and oklch(54.4% 0.171 285.5), and in CSS you can also write the keyword slateblue directly.
Is slateblue a warm or cool color?
SlateBlue is a cool color: its hue is 248° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
What colors go with slateblue?
Rotating the hue in OKLCH while keeping lightness and chroma, slateblue's complementary color is #7C7300 (close to olive), its analogous colors are #156DD0 and #9549B2, and its triadic partners are #BB4300 and #00885C. For text on top, white gives the higher contrast.
Can you use white text on slateblue?
White text on slateblue has a contrast ratio of 5.30:1, which passes AA for normal text but not AAA under WCAG 2.2. Black text reaches 3.95:1 and passes AA only for large text (24 px, or 18.66 px bold, and up). In APCA terms that is Lc −81.4 for white and Lc 28.0 for black.
What is the RGB value of slateblue?
SlateBlue is rgb(106, 90, 205): red 106, green 90 and blue 205 on the 0 to 255 scale, or 41.6%, 35.3% and 80.4%. As a decimal integer it is 6970061.

Last reviewed by Arielton Oberek.