MCPcopy Create free account
hub / github.com/adobe/react-spectrum / autoStaticColor

Function autoStaticColor

packages/@react-spectrum/s2/style/tokens.ts:113–115  ·  view source on GitHub ↗
(bg = 'var(--s2-container-bg)', alpha = 1)

Source from the content-addressed store, hash-verified

111 * background colors, 49.44 minimizes the number of WCAG 4.5:1 contrast failures.
112 */
113export function autoStaticColor(bg = 'var(--s2-container-bg)', alpha = 1): string {
114 return `lch(from ${bg} calc((49.44 - l) * infinity) 0 0 / ${alpha})`;
115}
116
117interface ColorScaleValues {
118 'transparent-overlay-25': string;

Callers 2

spectrum-theme.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected