pub fn index_of_rgb(&self, r: u8, g: u8, b: u8) -> Option<usize> {
		let r = r >> 4;
		let g = g >> 4;
		let b = b >> 4;
		self.entries
			.iter()
			.position(|&e| e.r == r && e.g == g && e.b == b)
	}
/// Whether an image contains a palette colour, and at what index
/// note that only the upper 4 bits of each color value is used
/// for comparison, the rest are thrown out
/// Note this will only return the first index
Whether an image contains a palette colour, and at what index
note that only the upper 4 bits of each color value is used
for comparison, the rest are thrown out
Note this will only return the first index
Whether an image contains a palette colour and at what index note that only the upper 4 bits of each color value is used for comparison the rest are thrown out Note this will only return the first index
pub fn index_of_rgb(&self, r: u8, g: u8, b: u8) -> Option<usize> {
		let r = r >> 4;
		let g = g >> 4;
		let b = b >> 4;
		self.entries
			.iter()
			.position(|&e| e.r == r && e.g == g && e.b == b)
	}
pub fn index_of_rgb ( & self , r : u8 , g : u8 , b : u8 ) -> Option < usize > { let r = r >> 4 ; let g = g >> 4 ; let b = b >> 4 ; self . entries . iter ( ) . position ( | & e | e . r == r && e . g == g && e . b == b ) }
Whether an image contains a palette colour, and at what index
note that only the upper 4 bits of each color value is used
for comparison, the rest are thrown out
Note this will only return the first index
Whether an image contains a palette colour and at what index note that only the upper 4 bits of each color value is used for comparison the rest are thrown out Note this will only return the first index
&self
r
u8
g
u8
b
u8