MCPcopy
hub / github.com/styled-components/polished / complement

Function complement

src/color/complement.js:27–34  ·  view source on GitHub ↗
(color: string)

Source from the content-addressed store, hash-verified

25 * }
26 */
27export default function complement(color: string): string {
28 if (color === 'transparent') return color
29 const hslColor = parseToHsl(color)
30 return toColorString({
31 ...hslColor,
32 hue: (hslColor.hue + 180) % 360,
33 })
34}

Callers 1

complement.test.jsFile · 0.50

Calls 2

parseToHslFunction · 0.70
toColorStringFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…