CSS utility
Mahogany CSS Utilities
Mahogany CSS utilities provide reusable variables and utility classes for #C04000. 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
Mahogany
#C04000
Utility Classes
CSS Snippet
:root {
--color-mahogany: #C04000;
--color-mahogany-rgb: 192 64 0;
--color-mahogany-contrast: #FFFFFF;
}
.bg-mahogany { background-color: var(--color-mahogany); }
.text-mahogany { color: var(--color-mahogany); }
.border-mahogany { border-color: var(--color-mahogany); }
.surface-mahogany {
background-color: var(--color-mahogany);
color: var(--color-mahogany-contrast);
border: 1px solid color-mix(in srgb, var(--color-mahogany), #111827 18%);
}
.shadow-mahogany { box-shadow: 0 18px 40px rgb(var(--color-mahogany-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 Mahogany CSS Utilities (JSON)
Structured CSS utility data for Mahogany, including variables, utility classes, contrast tokens, WCAG metadata, snippets, and API links.
Luminance0.1487
Black text3.97:1AA Fail
White text5.28:1AA Pass
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-mahogany: #C04000;",
"rgb": "--color-mahogany-rgb: 192 64 0;",
"contrast": "--color-mahogany-contrast: #FFFFFF;"
}Utility classes
{
"background": ".bg-mahogany",
"text": ".text-mahogany",
"border": ".border-mahogany",
"surface": ".surface-mahogany",
"shadow": ".shadow-mahogany"
}Accessibility
{
"bestTextColor": "#FFFFFF",
"contrast": {
"black": 3.97,
"white": 5.28
},
"wcag": {
"AA": [
"#FFFFFF",
"#F5F5F5"
],
"AAA": []
}
}Implementation
{
"useCases": [
"CSS variables",
"utility classes",
"design system tokens",
"UI surface styling",
"accessible text pairing"
],
"cssSnippet": ":root {\n --color-mahogany: #C04000;\n --color-mahogany-rgb: 192 64 0;\n --color-mahogany-contrast: #FFFFFF;\n}\n\n.bg-mahogany { background-color: var(--color-mahogany); }\n.text-mahogany { color: var(--color-mahogany); }\n.border-mahogany { border-color: var(--color-mahogany); }\n.surface-mahogany {\n background-color: var(--color-mahogany);\n color: var(--color-mahogany-contrast);\n border: 1px solid color-mix(in srgb, var(--color-mahogany), #111827 18%);\n}\n.shadow-mahogany { box-shadow: 0 18px 40px rgb(var(--color-mahogany-rgb) / 28%); }"
}Related endpoints
[
"https://www.colorsencyclopedia.com/api/css/colors/mahogany.json",
"https://www.colorsencyclopedia.com/api/colors/mahogany.json"
]Full JSON dataset
{
"datasetVersion": "1.0.0",
"slug": "mahogany",
"name": "Mahogany",
"hex": "#C04000",
"rgb": [
192,
64,
0
],
"hsl": [
20,
100,
38
],
"cmyk": [
0,
67,
100,
25
],
"luminance": 0.1487,
"contrast": {
"black": 3.97,
"white": 5.28
},
"wcag": {
"AA": [
"#FFFFFF",
"#F5F5F5"
],
"AAA": []
},
"family": "orange",
"temperature": "warm",
"tone": [
"vibrant"
],
"bestTextColor": "#FFFFFF",
"cssVariables": {
"color": "--color-mahogany: #C04000;",
"rgb": "--color-mahogany-rgb: 192 64 0;",
"contrast": "--color-mahogany-contrast: #FFFFFF;"
},
"utilityClasses": {
"background": ".bg-mahogany",
"text": ".text-mahogany",
"border": ".border-mahogany",
"surface": ".surface-mahogany",
"shadow": ".shadow-mahogany"
},
"cssSnippet": ":root {\n --color-mahogany: #C04000;\n --color-mahogany-rgb: 192 64 0;\n --color-mahogany-contrast: #FFFFFF;\n}\n\n.bg-mahogany { background-color: var(--color-mahogany); }\n.text-mahogany { color: var(--color-mahogany); }\n.border-mahogany { border-color: var(--color-mahogany); }\n.surface-mahogany {\n background-color: var(--color-mahogany);\n color: var(--color-mahogany-contrast);\n border: 1px solid color-mix(in srgb, var(--color-mahogany), #111827 18%);\n}\n.shadow-mahogany { box-shadow: 0 18px 40px rgb(var(--color-mahogany-rgb) / 28%); }",
"useCases": [
"CSS variables",
"utility classes",
"design system tokens",
"UI surface styling",
"accessible text pairing"
],
"relatedEndpoints": [
"https://www.colorsencyclopedia.com/api/css/colors/mahogany.json",
"https://www.colorsencyclopedia.com/api/colors/mahogany.json"
],
"url": "https://www.colorsencyclopedia.com/css/colors/mahogany/",
"colorUrl": "https://www.colorsencyclopedia.com/colors/mahogany/",
"hexUrl": "https://www.colorsencyclopedia.com/hex/c04000/",
"apiUrl": "https://www.colorsencyclopedia.com/api/css/colors/mahogany.json"
}