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

Function hcmColor

packages/@react-spectrum/s2/style/spectrum-theme.ts:63–70  ·  view source on GitHub ↗
(color: string)

Source from the content-addressed store, hash-verified

61}
62
63function hcmColor(color: string) {
64 // In the docs, HCM colors can be simulated.
65 if (process.env.DOCS_ENV) {
66 return `var(--hcm-${color.toLowerCase()}, ${color})`;
67 }
68
69 return color;
70}
71
72const baseColors = {
73 transparent: 'transparent',

Callers 1

spectrum-theme.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected