pub fn luminance<T: Bounded + NumCast, F: Float + NumCast + Div>(color: RGB<T>) -> F {
    let channels: [T; 3] = color.into();
    let [r, g, b] = channels;
    scale_channel::<T, F>(r) * cast(0.2126).unwrap()
        + scale_channel::<T, F>(g) * cast(0.7152).unwrap()
        + scale_channel::<T, F>(b) * cast(0.0722).unwrap()
}
/// Convert sRGB color to perceptual luminance
///
/// See [Wikipedia: Converting color to Grayscale](https://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale)
Convert sRGB color to perceptual luminance
See [Wikipedia: Converting color to Grayscale]
Convert sRGB color to perceptual luminance See [ Wikipedia : Converting color to Grayscale ]
pub fn luminance<T: Bounded + NumCast, F: Float + NumCast + Div>(color: RGB<T>) -> F {
    let channels: [T; 3] = color.into();
    let [r, g, b] = channels;
    scale_channel::<T, F>(r) * cast(0.2126).unwrap()
        + scale_channel::<T, F>(g) * cast(0.7152).unwrap()
        + scale_channel::<T, F>(b) * cast(0.0722).unwrap()
}
pub fn luminance < T : Bounded + NumCast , F : Float + NumCast + Div > ( color : RGB < T > ) -> F { let channels : [ T ; 3 ] = color . into ( ) ; let [ r , g , b ] = channels ; scale_channel :: < T , F > ( r ) * cast ( 0.2126 ) . unwrap ( ) + scale_channel :: < T , F > ( g ) * cast ( 0.7152 ) . unwrap ( ) + scale_channel :: < T , F > ( b ) * cast ( 0.0722 ) . unwrap ( ) }
Convert sRGB color to perceptual luminance
See [Wikipedia: Converting color to Grayscale](https://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale)
Convert sRGB color to perceptual luminance See [ Wikipedia : Converting color to Grayscale ] ( https : // en . wikipedia . org / wiki / Grayscale#Converting_color_to_grayscale )
color
RGB<T>
color
RGB<T>