pub fn color(mut self, color: u32) -> Result<Self, RoleFieldsError> {
        if color > Self::COLOR_MAXIMUM {
            return Err(RoleFieldsError::ColorNotRgb { color });
        }

        self.0.color.replace(color);

        Ok(self)
    }
/// Set the role color.
///
/// This must be a valid hexadecimal RGB value.
///
/// # Errors
///
/// Returns [`RoleFieldsError::ColorNotRgb`] if the color is not valid RGB.
Set the role color.
This must be a valid hexadecimal RGB value.
Set the role color . This must be a valid hexadecimal RGB value .
pub fn color(mut self, color: u32) -> Result<Self, RoleFieldsError> {
        if color > Self::COLOR_MAXIMUM {
            return Err(RoleFieldsError::ColorNotRgb { color });
        }
        self.0.color.replace(color);
        Ok(self)
    }
pub fn color ( mut self , color : u32 ) -> Result < Self , RoleFieldsError > { if color > Self :: COLOR_MAXIMUM { return Err ( RoleFieldsError :: ColorNotRgb { color } ) ; } self . 0 . color . replace ( color ) ; Ok ( self ) }
Set the role color.
Set the role color .
mut self
color
u32
errors
Returns [`RoleFieldsError::ColorNotRgb`] if the color is not valid RGB.
Returns [ ` RoleFieldsError :: ColorNotRgb ` ] if the color is not valid RGB .