@skchr/color
    Preparing search index...

    Function mc

    • Sets the value of the specified channel on the passed in color.

      If the amount parameter is undefined it gets the value of the specified channel.

      Parameters

      • modeChannel: string = ""

        The mode and channel to be retrieved. For example 'rgb.b' will return the value of the blue channel in the RGB color space of that color.

      Returns <Value extends unknown>(
          color?: ColorToken,
          value?: Value,
      ) => Value extends number ? ColorToken : number

      import { mc } from '@skchr/color'

      console.log(mc('rgb.g')('#a1bd2f'))
      // 0.7411764705882353