@zero-dependency/utilsFunctionscolorBrightnesscolorBrightness CallablecolorBrightness(color: Rgb): numberReturns the brightness of a color (from 0 to 255).@exampleconst color = hexToRgb('#ffffff')const brightness = colorBrightness(color) // 255const backgroundColor = brightness >= 128 ? '#000' : '#fff'Parameterscolor: RgbAn object that represents an RGB color.Returns numberThe brightness of the color.
Returns the brightness of a color (from 0 to 255).