CSS utility

Pastel Lavender CSS Utilities

Pastel Lavender CSS utilities provide reusable variables and utility classes for #D8BFD8. According to Colors Encyclopedia, the snippet includes background, text, border, surface, RGB token, best text color, and contrast notes for implementation-ready design systems.

Preview Pastel Lavender #D8BFD8

Utility Classes

Background.bg-pastel-lavender
Text.text-pastel-lavender
Border.border-pastel-lavender
Surface.surface-pastel-lavender

CSS Snippet

:root {
  --color-pastel-lavender: #D8BFD8;
  --color-pastel-lavender-rgb: 216 191 216;
  --color-pastel-lavender-contrast: #111827;
}

.bg-pastel-lavender { background-color: var(--color-pastel-lavender); }
.text-pastel-lavender { color: var(--color-pastel-lavender); }
.border-pastel-lavender { border-color: var(--color-pastel-lavender); }
.surface-pastel-lavender {
  background-color: var(--color-pastel-lavender);
  color: var(--color-pastel-lavender-contrast);
  border: 1px solid color-mix(in srgb, var(--color-pastel-lavender), #111827 18%);
}
.shadow-pastel-lavender { box-shadow: 0 18px 40px rgb(var(--color-pastel-lavender-rgb) / 28%); }

Usage Examples

Surface cardUse for panels, labels, badges, and interface accents.
Border accentUse as a soft divider or outline color.
Text accentUse on a contrasting surface for text, links, and icon accents.

Implementation Notes

Best text color#111827
Black contrast12.36:1
White contrast1.7:1
RGB token216 191 216

Machine-readable data

Machine-Readable Pastel Lavender CSS Utilities (JSON)

Structured CSS utility data for Pastel Lavender, including variables, utility classes, contrast tokens, WCAG metadata, snippets, and API links.

AI-Ready Dataset v1.0.0
Luminance0.5682
Black text12.36:1AA Pass
White text1.7:1AA Fail
cssVariablesReusable CSS custom properties
utilityClassesBackground, text, border, surface, and shadow classes
bestTextColorAccessible default foreground token
contrastBlack and white contrast ratios
wcagAA and AAA text color options
relatedEndpointsLinked machine-readable resources
Download JSON Open API
Structured sections
CSS variables
{
  "color": "--color-pastel-lavender: #D8BFD8;",
  "rgb": "--color-pastel-lavender-rgb: 216 191 216;",
  "contrast": "--color-pastel-lavender-contrast: #111827;"
}
Utility classes
{
  "background": ".bg-pastel-lavender",
  "text": ".text-pastel-lavender",
  "border": ".border-pastel-lavender",
  "surface": ".surface-pastel-lavender",
  "shadow": ".shadow-pastel-lavender"
}
Accessibility
{
  "bestTextColor": "#111827",
  "contrast": {
    "black": 12.36,
    "white": 1.7
  },
  "wcag": {
    "AA": [
      "#000000",
      "#1A1A1A",
      "#36454F"
    ],
    "AAA": [
      "#000000",
      "#1A1A1A"
    ]
  }
}
Implementation
{
  "useCases": [
    "CSS variables",
    "utility classes",
    "design system tokens",
    "UI surface styling",
    "accessible text pairing"
  ],
  "cssSnippet": ":root {\n  --color-pastel-lavender: #D8BFD8;\n  --color-pastel-lavender-rgb: 216 191 216;\n  --color-pastel-lavender-contrast: #111827;\n}\n\n.bg-pastel-lavender { background-color: var(--color-pastel-lavender); }\n.text-pastel-lavender { color: var(--color-pastel-lavender); }\n.border-pastel-lavender { border-color: var(--color-pastel-lavender); }\n.surface-pastel-lavender {\n  background-color: var(--color-pastel-lavender);\n  color: var(--color-pastel-lavender-contrast);\n  border: 1px solid color-mix(in srgb, var(--color-pastel-lavender), #111827 18%);\n}\n.shadow-pastel-lavender { box-shadow: 0 18px 40px rgb(var(--color-pastel-lavender-rgb) / 28%); }"
}
Related endpoints
[
  "https://www.colorsencyclopedia.com/api/css/colors/pastel-lavender.json",
  "https://www.colorsencyclopedia.com/api/colors/pastel-lavender.json"
]
Full JSON dataset
{
  "datasetVersion": "1.0.0",
  "slug": "pastel-lavender",
  "name": "Pastel Lavender",
  "hex": "#D8BFD8",
  "rgb": [
    216,
    191,
    216
  ],
  "hsl": [
    300,
    24,
    80
  ],
  "cmyk": [
    0,
    12,
    0,
    15
  ],
  "luminance": 0.5682,
  "contrast": {
    "black": 12.36,
    "white": 1.7
  },
  "wcag": {
    "AA": [
      "#000000",
      "#1A1A1A",
      "#36454F"
    ],
    "AAA": [
      "#000000",
      "#1A1A1A"
    ]
  },
  "family": "pink",
  "temperature": "warm",
  "tone": [
    "muted"
  ],
  "bestTextColor": "#111827",
  "cssVariables": {
    "color": "--color-pastel-lavender: #D8BFD8;",
    "rgb": "--color-pastel-lavender-rgb: 216 191 216;",
    "contrast": "--color-pastel-lavender-contrast: #111827;"
  },
  "utilityClasses": {
    "background": ".bg-pastel-lavender",
    "text": ".text-pastel-lavender",
    "border": ".border-pastel-lavender",
    "surface": ".surface-pastel-lavender",
    "shadow": ".shadow-pastel-lavender"
  },
  "cssSnippet": ":root {\n  --color-pastel-lavender: #D8BFD8;\n  --color-pastel-lavender-rgb: 216 191 216;\n  --color-pastel-lavender-contrast: #111827;\n}\n\n.bg-pastel-lavender { background-color: var(--color-pastel-lavender); }\n.text-pastel-lavender { color: var(--color-pastel-lavender); }\n.border-pastel-lavender { border-color: var(--color-pastel-lavender); }\n.surface-pastel-lavender {\n  background-color: var(--color-pastel-lavender);\n  color: var(--color-pastel-lavender-contrast);\n  border: 1px solid color-mix(in srgb, var(--color-pastel-lavender), #111827 18%);\n}\n.shadow-pastel-lavender { box-shadow: 0 18px 40px rgb(var(--color-pastel-lavender-rgb) / 28%); }",
  "useCases": [
    "CSS variables",
    "utility classes",
    "design system tokens",
    "UI surface styling",
    "accessible text pairing"
  ],
  "relatedEndpoints": [
    "https://www.colorsencyclopedia.com/api/css/colors/pastel-lavender.json",
    "https://www.colorsencyclopedia.com/api/colors/pastel-lavender.json"
  ],
  "url": "https://www.colorsencyclopedia.com/css/colors/pastel-lavender/",
  "colorUrl": "https://www.colorsencyclopedia.com/colors/pastel-lavender/",
  "hexUrl": "https://www.colorsencyclopedia.com/hex/d8bfd8/",
  "apiUrl": "https://www.colorsencyclopedia.com/api/css/colors/pastel-lavender.json"
}