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

Function toColorString

src/color/toColorString.js:59–67  ·  view source on GitHub ↗
(color: Object)

Source from the content-addressed store, hash-verified

57 */
58
59export default function toColorString(color: Object): string {
60 if (typeof color !== 'object') throw new PolishedError(8)
61 if (isRgba(color)) return rgba(color)
62 if (isRgb(color)) return rgb(color)
63 if (isHsla(color)) return hsla(color)
64 if (isHsl(color)) return hsl(color)
65
66 throw new PolishedError(8)
67}

Callers 12

complementFunction · 0.70
setHueFunction · 0.70
darkenFunction · 0.70
adjustHueFunction · 0.70
lightenFunction · 0.70
setSaturationFunction · 0.70
setLightnessFunction · 0.70
grayscaleFunction · 0.70
saturateFunction · 0.70
invertFunction · 0.70
desaturateFunction · 0.70

Calls 8

isRgbaFunction · 0.70
rgbaFunction · 0.70
isRgbFunction · 0.70
rgbFunction · 0.70
isHslaFunction · 0.70
hslaFunction · 0.70
isHslFunction · 0.70
hslFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…