pub fn try_new(brightness: u8) -> Result<Self, BadGrayColor> {
        if brightness > Self::MAX.brightness() {
            Err(BadGrayColor { brightness })
        } else {
            Ok(Self { brightness })
        }
    }
/// Creates a new gray-scale color given its brightness. Returns an error if
/// `brightness > MAX`.
Creates a new gray-scale color given its brightness. Returns an error if
`brightness > MAX`.
Creates a new gray - scale color given its brightness . Returns an error if ` brightness > MAX ` .
pub fn try_new(brightness: u8) -> Result<Self, BadGrayColor> {
        if brightness > Self::MAX.brightness() {
            Err(BadGrayColor { brightness })
        } else {
            Ok(Self { brightness })
        }
    }
pub fn try_new ( brightness : u8 ) -> Result < Self , BadGrayColor > { if brightness > Self :: MAX . brightness ( ) { Err ( BadGrayColor { brightness } ) } else { Ok ( Self { brightness } ) } }
Creates a new gray-scale color given its brightness.
Creates a new gray - scale color given its brightness .
brightness
u8
brightness
u8