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

Function parseToHsl

src/color/parseToHsl.js:18–22  ·  view source on GitHub ↗
(color: string)

Source from the content-addressed store, hash-verified

16 * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
17 */
18export default function parseToHsl(color: string): HslColor | HslaColor {
19 // Note: At a later stage we can optimize this function as right now a hsl
20 // color would be parsed converted to rgb values and converted back to hsl.
21 return rgbToHsl(parseToRgb(color))
22}

Callers 11

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
desaturateFunction · 0.70
parseToHsl.test.jsFile · 0.50

Calls 2

parseToRgbFunction · 0.70
rgbToHslFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…