pub fn all_indices_of_rgb(&self, r: u8, g: u8, b: u8) -> (VeraPaletteEntry, Vec<usize>) {
		let r = r >> 4;
		let g = g >> 4;
		let b = b >> 4;
		let mut ret_entry = VeraPaletteEntry::default();
		let ret_vec = self
			.entries
			.iter()
			.enumerate()
			.filter(|(_, e)| e.r == r && e.g == g && e.b == b)
			.map(|(i, e)| {
				ret_entry = e.clone();
				i
			})
			.collect();
		(ret_entry, ret_vec)
	}
/// Return all instances of a colour in the palette
Return all instances of a colour in the palette
Return all instances of a colour in the palette
pub fn all_indices_of_rgb(&self, r: u8, g: u8, b: u8) -> (VeraPaletteEntry, Vec<usize>) {
		let r = r >> 4;
		let g = g >> 4;
		let b = b >> 4;
		let mut ret_entry = VeraPaletteEntry::default();
		let ret_vec = self
			.entries
			.iter()
			.enumerate()
			.filter(|(_, e)| e.r == r && e.g == g && e.b == b)
			.map(|(i, e)| {
				ret_entry = e.clone();
				i
			})
			.collect();
		(ret_entry, ret_vec)
	}
pub fn all_indices_of_rgb ( & self , r : u8 , g : u8 , b : u8 ) -> ( VeraPaletteEntry , Vec < usize > ) { let r = r >> 4 ; let g = g >> 4 ; let b = b >> 4 ; let mut ret_entry = VeraPaletteEntry :: default ( ) ; let ret_vec = self . entries . iter ( ) . enumerate ( ) . filter ( | ( _ , e ) | e . r == r && e . g == g && e . b == b ) . map ( | ( i , e ) | { ret_entry = e . clone ( ) ; i } ) . collect ( ) ; ( ret_entry , ret_vec ) }
Return all instances of a colour in the palette
Return all instances of a colour in the palette
&self
r
u8
g
u8
b
u8