pub fn valid_color(&self, color: TgaColor) -> bool {
        match self {
            NoImage => false,
            ColorMappedImage | TrueColorImage |
            RleColorMappedImage |
            RleTrueColorImage => match color {
                Greyscale(_) => false,
                _ => true
            },
            BlackAndWhiteImage | RleBlackAndWhiteImage => match color {
                Greyscale(_) => true,
                _ => false
            }
        }
    }
/// Returns true if `color` is in a valid format for the image type.
Returns true if `color` is in a valid format for the image type.
Returns true if ` color ` is in a valid format for the image type .
pub fn valid_color(&self, color: TgaColor) -> bool {
        match self {
            NoImage => false,
            ColorMappedImage | TrueColorImage |
            RleColorMappedImage |
            RleTrueColorImage => match color {
                Greyscale(_) => false,
                _ => true
            },
            BlackAndWhiteImage | RleBlackAndWhiteImage => match color {
                Greyscale(_) => true,
                _ => false
            }
        }
    }
pub fn valid_color ( & self , color : TgaColor ) -> bool { match self { NoImage => false , ColorMappedImage | TrueColorImage | RleColorMappedImage | RleTrueColorImage => match color { Greyscale ( _ ) => false , _ => true } , BlackAndWhiteImage | RleBlackAndWhiteImage => match color { Greyscale ( _ ) => true , _ => false } } }
Returns true if `color` is in a valid format for the image type.
Returns true if ` color ` is in a valid format for the image type .
&self
color
TgaColor
&self
color
TgaColor