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

Function hue

packages/react-aria/src/color/useColorAreaGradient.ts:19–22  ·  view source on GitHub ↗
(color: Color)

Source from the content-addressed store, hash-verified

17import {parseColor} from 'react-stately/Color';
18
19const hue = (color: Color) =>
20 [0, 60, 120, 180, 240, 300, 360]
21 .map(hue => color.withChannelValue('hue', hue).toString('css'))
22 .join(', ');
23const saturation = (color: Color) => `${color.withChannelValue('saturation', 0)}, transparent`;
24
25const hslChannels = {

Callers

nothing calls this directly

Calls 2

withChannelValueMethod · 0.80
toStringMethod · 0.65

Tested by

no test coverage detected