color-thief-rs
color-thief-rs copied to clipboard
Strange colors output
Hello
Some of the results I'm getting dont seem correct.
For example, I use this red image I get results that dont appear to correspond to the image.
This is an example of the code I'm using:
let palette = match color_thief::get_palette(&img_bytes, ColorFormat::Rgb, 10, 2) {
Ok(colors) => colors,
Err(e) => {
// Handle the error explicitly without using `?`
return Err(anyhow!("Failed to get palette: {}", e));
}
};
And this is the json-ized result:
[
{
"red": 172,
"green": 82,
"blue": 122
},
{
"red": 21,
"green": 110,
"blue": 153
}
]