CSS utility
Rubber CSS Utilities
Rubber CSS utilities provide reusable variables and utility classes for #2A2725. 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
Rubber
#2A2725
Utility Classes
CSS Snippet
:root {
--color-rubber: #2A2725;
--color-rubber-rgb: 42 39 37;
--color-rubber-contrast: #FFFFFF;
}
.bg-rubber { background-color: var(--color-rubber); }
.text-rubber { color: var(--color-rubber); }
.border-rubber { border-color: var(--color-rubber); }
.surface-rubber {
background-color: var(--color-rubber);
color: var(--color-rubber-contrast);
border: 1px solid color-mix(in srgb, var(--color-rubber), #111827 18%);
}
.shadow-rubber { box-shadow: 0 18px 40px rgb(var(--color-rubber-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 Rubber CSS Utilities (JSON)
Structured CSS utility data for Rubber, including variables, utility classes, contrast tokens, WCAG metadata, snippets, and API links.
Luminance0.0208
Black text1.42:1AA Fail
White text14.83: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-rubber: #2A2725;",
"rgb": "--color-rubber-rgb: 42 39 37;",
"contrast": "--color-rubber-contrast: #FFFFFF;"
}Utility classes
{
"background": ".bg-rubber",
"text": ".text-rubber",
"border": ".border-rubber",
"surface": ".surface-rubber",
"shadow": ".shadow-rubber"
}Accessibility
{
"bestTextColor": "#FFFFFF",
"contrast": {
"black": 1.42,
"white": 14.83
},
"wcag": {
"AA": [
"#FFFFFF",
"#F5F5F5"
],
"AAA": [
"#FFFFFF",
"#F5F5F5"
]
}
}Implementation
{
"useCases": [
"CSS variables",
"utility classes",
"design system tokens",
"UI surface styling",
"accessible text pairing"
],
"cssSnippet": ":root {\n --color-rubber: #2A2725;\n --color-rubber-rgb: 42 39 37;\n --color-rubber-contrast: #FFFFFF;\n}\n\n.bg-rubber { background-color: var(--color-rubber); }\n.text-rubber { color: var(--color-rubber); }\n.border-rubber { border-color: var(--color-rubber); }\n.surface-rubber {\n background-color: var(--color-rubber);\n color: var(--color-rubber-contrast);\n border: 1px solid color-mix(in srgb, var(--color-rubber), #111827 18%);\n}\n.shadow-rubber { box-shadow: 0 18px 40px rgb(var(--color-rubber-rgb) / 28%); }"
}Related endpoints
[
"https://www.colorsencyclopedia.com/api/css/colors/rubber.json",
"https://www.colorsencyclopedia.com/api/colors/rubber.json"
]Full JSON dataset
{
"datasetVersion": "1.0.0",
"slug": "rubber",
"name": "Rubber",
"hex": "#2A2725",
"rgb": [
42,
39,
37
],
"hsl": [
24,
6,
15
],
"cmyk": [
0,
7,
12,
84
],
"luminance": 0.0208,
"contrast": {
"black": 1.42,
"white": 14.83
},
"wcag": {
"AA": [
"#FFFFFF",
"#F5F5F5"
],
"AAA": [
"#FFFFFF",
"#F5F5F5"
]
},
"family": "gray",
"temperature": "neutral",
"tone": [
"dark"
],
"bestTextColor": "#FFFFFF",
"cssVariables": {
"color": "--color-rubber: #2A2725;",
"rgb": "--color-rubber-rgb: 42 39 37;",
"contrast": "--color-rubber-contrast: #FFFFFF;"
},
"utilityClasses": {
"background": ".bg-rubber",
"text": ".text-rubber",
"border": ".border-rubber",
"surface": ".surface-rubber",
"shadow": ".shadow-rubber"
},
"cssSnippet": ":root {\n --color-rubber: #2A2725;\n --color-rubber-rgb: 42 39 37;\n --color-rubber-contrast: #FFFFFF;\n}\n\n.bg-rubber { background-color: var(--color-rubber); }\n.text-rubber { color: var(--color-rubber); }\n.border-rubber { border-color: var(--color-rubber); }\n.surface-rubber {\n background-color: var(--color-rubber);\n color: var(--color-rubber-contrast);\n border: 1px solid color-mix(in srgb, var(--color-rubber), #111827 18%);\n}\n.shadow-rubber { box-shadow: 0 18px 40px rgb(var(--color-rubber-rgb) / 28%); }",
"useCases": [
"CSS variables",
"utility classes",
"design system tokens",
"UI surface styling",
"accessible text pairing"
],
"relatedEndpoints": [
"https://www.colorsencyclopedia.com/api/css/colors/rubber.json",
"https://www.colorsencyclopedia.com/api/colors/rubber.json"
],
"url": "https://www.colorsencyclopedia.com/css/colors/rubber/",
"colorUrl": "https://www.colorsencyclopedia.com/colors/rubber/",
"hexUrl": "https://www.colorsencyclopedia.com/hex/2a2725/",
"apiUrl": "https://www.colorsencyclopedia.com/api/css/colors/rubber.json"
}