CSS utility

Light Gray CSS Utilities

Light Gray CSS utilities provide reusable variables and utility classes for #D3D3D3. 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 Light Gray #D3D3D3

Utility Classes

Background.bg-light-gray
Text.text-light-gray
Border.border-light-gray
Surface.surface-light-gray

CSS Snippet

:root {
  --color-light-gray: #D3D3D3;
  --color-light-gray-rgb: 211 211 211;
  --color-light-gray-contrast: #111827;
}

.bg-light-gray { background-color: var(--color-light-gray); }
.text-light-gray { color: var(--color-light-gray); }
.border-light-gray { border-color: var(--color-light-gray); }
.surface-light-gray {
  background-color: var(--color-light-gray);
  color: var(--color-light-gray-contrast);
  border: 1px solid color-mix(in srgb, var(--color-light-gray), #111827 18%);
}
.shadow-light-gray { box-shadow: 0 18px 40px rgb(var(--color-light-gray-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 contrast14.03:1
White contrast1.5:1
RGB token211 211 211

Machine-readable data

Machine-Readable Light Gray CSS Utilities (JSON)

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

AI-Ready Dataset v1.0.0
Luminance0.6514
Black text14.03:1AA Pass
White text1.5: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-light-gray: #D3D3D3;",
  "rgb": "--color-light-gray-rgb: 211 211 211;",
  "contrast": "--color-light-gray-contrast: #111827;"
}
Utility classes
{
  "background": ".bg-light-gray",
  "text": ".text-light-gray",
  "border": ".border-light-gray",
  "surface": ".surface-light-gray",
  "shadow": ".shadow-light-gray"
}
Accessibility
{
  "bestTextColor": "#111827",
  "contrast": {
    "black": 14.03,
    "white": 1.5
  },
  "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-light-gray: #D3D3D3;\n  --color-light-gray-rgb: 211 211 211;\n  --color-light-gray-contrast: #111827;\n}\n\n.bg-light-gray { background-color: var(--color-light-gray); }\n.text-light-gray { color: var(--color-light-gray); }\n.border-light-gray { border-color: var(--color-light-gray); }\n.surface-light-gray {\n  background-color: var(--color-light-gray);\n  color: var(--color-light-gray-contrast);\n  border: 1px solid color-mix(in srgb, var(--color-light-gray), #111827 18%);\n}\n.shadow-light-gray { box-shadow: 0 18px 40px rgb(var(--color-light-gray-rgb) / 28%); }"
}
Related endpoints
[
  "https://www.colorsencyclopedia.com/api/css/colors/light-gray.json",
  "https://www.colorsencyclopedia.com/api/colors/light-gray.json"
]
Full JSON dataset
{
  "datasetVersion": "1.0.0",
  "slug": "light-gray",
  "name": "Light Gray",
  "hex": "#D3D3D3",
  "rgb": [
    211,
    211,
    211
  ],
  "hsl": [
    0,
    0,
    83
  ],
  "cmyk": [
    0,
    0,
    0,
    17
  ],
  "luminance": 0.6514,
  "contrast": {
    "black": 14.03,
    "white": 1.5
  },
  "wcag": {
    "AA": [
      "#000000",
      "#1A1A1A",
      "#36454F"
    ],
    "AAA": [
      "#000000",
      "#1A1A1A"
    ]
  },
  "family": "gray",
  "temperature": "neutral",
  "tone": [
    "muted"
  ],
  "bestTextColor": "#111827",
  "cssVariables": {
    "color": "--color-light-gray: #D3D3D3;",
    "rgb": "--color-light-gray-rgb: 211 211 211;",
    "contrast": "--color-light-gray-contrast: #111827;"
  },
  "utilityClasses": {
    "background": ".bg-light-gray",
    "text": ".text-light-gray",
    "border": ".border-light-gray",
    "surface": ".surface-light-gray",
    "shadow": ".shadow-light-gray"
  },
  "cssSnippet": ":root {\n  --color-light-gray: #D3D3D3;\n  --color-light-gray-rgb: 211 211 211;\n  --color-light-gray-contrast: #111827;\n}\n\n.bg-light-gray { background-color: var(--color-light-gray); }\n.text-light-gray { color: var(--color-light-gray); }\n.border-light-gray { border-color: var(--color-light-gray); }\n.surface-light-gray {\n  background-color: var(--color-light-gray);\n  color: var(--color-light-gray-contrast);\n  border: 1px solid color-mix(in srgb, var(--color-light-gray), #111827 18%);\n}\n.shadow-light-gray { box-shadow: 0 18px 40px rgb(var(--color-light-gray-rgb) / 28%); }",
  "useCases": [
    "CSS variables",
    "utility classes",
    "design system tokens",
    "UI surface styling",
    "accessible text pairing"
  ],
  "relatedEndpoints": [
    "https://www.colorsencyclopedia.com/api/css/colors/light-gray.json",
    "https://www.colorsencyclopedia.com/api/colors/light-gray.json"
  ],
  "url": "https://www.colorsencyclopedia.com/css/colors/light-gray/",
  "colorUrl": "https://www.colorsencyclopedia.com/colors/light-gray/",
  "hexUrl": "https://www.colorsencyclopedia.com/hex/d3d3d3/",
  "apiUrl": "https://www.colorsencyclopedia.com/api/css/colors/light-gray.json"
}