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

Function getChannelValue

packages/react-stately/src/color/Color.ts:104–110  ·  view source on GitHub ↗
(channel: ColorChannel)

Source from the content-addressed store, hash-verified

102 }
103
104 getChannelValue(channel: ColorChannel): number {
105 if (channel in this) {
106 return this[channel];
107 }
108
109 throw new Error('Unsupported color channel: ' + channel);
110 }
111
112 withChannelValue(channel: ColorChannel, value: number): IColor {
113 if (channel in this) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected