CSS utility
Heather CSS Utilities
Heather CSS utilities provide reusable variables and utility classes for #B7A1C7. 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
Heather
#B7A1C7
Utility Classes
CSS Snippet
:root {
--color-heather: #B7A1C7;
--color-heather-rgb: 183 161 199;
--color-heather-contrast: #111827;
}
.bg-heather { background-color: var(--color-heather); }
.text-heather { color: var(--color-heather); }
.border-heather { border-color: var(--color-heather); }
.surface-heather {
background-color: var(--color-heather);
color: var(--color-heather-contrast);
border: 1px solid color-mix(in srgb, var(--color-heather), #111827 18%);
}
.shadow-heather { box-shadow: 0 18px 40px rgb(var(--color-heather-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
Machine-readable data
Machine-Readable Heather CSS Utilities (JSON)
Structured CSS utility data for Heather, including variables, utility classes, contrast tokens, WCAG metadata, snippets, and API links.
Luminance0.3968
Black text8.94:1AA Pass
White text2.35:1AA Fail
cssVariablesReusable CSS custom propertiesutilityClassesBackground, text, border, surface, and shadow classesbestTextColorAccessible default foreground tokencontrastBlack and white contrast ratioswcagAA and AAA text color optionsrelatedEndpointsLinked machine-readable resourcesStructured sections
CSS variables
{
"color": "--color-heather: #B7A1C7;",
"rgb": "--color-heather-rgb: 183 161 199;",
"contrast": "--color-heather-contrast: #111827;"
}Utility classes
{
"background": ".bg-heather",
"text": ".text-heather",
"border": ".border-heather",
"surface": ".surface-heather",
"shadow": ".shadow-heather"
}Accessibility
{
"bestTextColor": "#111827",
"contrast": {
"black": 8.94,
"white": 2.35
},
"wcag": {
"AA": [
"#000000",
"#1A1A1A"
],
"AAA": [
"#000000",
"#1A1A1A"
]
}
}Implementation
{
"useCases": [
"CSS variables",
"utility classes",
"design system tokens",
"UI surface styling",
"accessible text pairing"
],
"cssSnippet": ":root {\n --color-heather: #B7A1C7;\n --color-heather-rgb: 183 161 199;\n --color-heather-contrast: #111827;\n}\n\n.bg-heather { background-color: var(--color-heather); }\n.text-heather { color: var(--color-heather); }\n.border-heather { border-color: var(--color-heather); }\n.surface-heather {\n background-color: var(--color-heather);\n color: var(--color-heather-contrast);\n border: 1px solid color-mix(in srgb, var(--color-heather), #111827 18%);\n}\n.shadow-heather { box-shadow: 0 18px 40px rgb(var(--color-heather-rgb) / 28%); }"
}Related endpoints
[
"https://www.colorsencyclopedia.com/api/css/colors/heather.json",
"https://www.colorsencyclopedia.com/api/colors/heather.json"
]Full JSON dataset
{
"datasetVersion": "1.0.0",
"slug": "heather",
"name": "Heather",
"hex": "#B7A1C7",
"rgb": [
183,
161,
199
],
"hsl": [
275,
25,
71
],
"cmyk": [
8,
19,
0,
22
],
"luminance": 0.3968,
"contrast": {
"black": 8.94,
"white": 2.35
},
"wcag": {
"AA": [
"#000000",
"#1A1A1A"
],
"AAA": [
"#000000",
"#1A1A1A"
]
},
"family": "purple",
"temperature": "cool",
"tone": [
"muted"
],
"bestTextColor": "#111827",
"cssVariables": {
"color": "--color-heather: #B7A1C7;",
"rgb": "--color-heather-rgb: 183 161 199;",
"contrast": "--color-heather-contrast: #111827;"
},
"utilityClasses": {
"background": ".bg-heather",
"text": ".text-heather",
"border": ".border-heather",
"surface": ".surface-heather",
"shadow": ".shadow-heather"
},
"cssSnippet": ":root {\n --color-heather: #B7A1C7;\n --color-heather-rgb: 183 161 199;\n --color-heather-contrast: #111827;\n}\n\n.bg-heather { background-color: var(--color-heather); }\n.text-heather { color: var(--color-heather); }\n.border-heather { border-color: var(--color-heather); }\n.surface-heather {\n background-color: var(--color-heather);\n color: var(--color-heather-contrast);\n border: 1px solid color-mix(in srgb, var(--color-heather), #111827 18%);\n}\n.shadow-heather { box-shadow: 0 18px 40px rgb(var(--color-heather-rgb) / 28%); }",
"useCases": [
"CSS variables",
"utility classes",
"design system tokens",
"UI surface styling",
"accessible text pairing"
],
"relatedEndpoints": [
"https://www.colorsencyclopedia.com/api/css/colors/heather.json",
"https://www.colorsencyclopedia.com/api/colors/heather.json"
],
"url": "https://www.colorsencyclopedia.com/css/colors/heather/",
"colorUrl": "https://www.colorsencyclopedia.com/colors/heather/",
"hexUrl": "https://www.colorsencyclopedia.com/hex/b7a1c7/",
"apiUrl": "https://www.colorsencyclopedia.com/api/css/colors/heather.json"
}