MCPcopy
hub / github.com/adobe/react-spectrum / fn

Method fn

packages/react-stately/src/color/Color.ts:577–578  ·  view source on GitHub ↗
(n: number, k = (n + hue / 60) % 6)

Source from the content-addressed store, hash-verified

575 let saturation = this.saturation / 100;
576 let brightness = this.brightness / 100;
577 let fn = (n: number, k = (n + hue / 60) % 6) =>
578 brightness - saturation * brightness * Math.max(Math.min(k, 4 - k, 1), 0);
579 return new RGBColor(
580 Math.round(fn(5) * 255),
581 Math.round(fn(3) * 255),

Callers 15

useHover.test.jsFile · 0.45
Pressable.test.jsFile · 0.45
Focusable.test.jsFile · 0.45
usePress.test.jsFile · 0.45
useFocus.test.jsFile · 0.45
mergeRefs.test.tsxFile · 0.45

Calls

no outgoing calls

Tested by 3

testBackspaceFunction · 0.36
mockAnimationsFunction · 0.36