Open adamgerhant opened 3 months ago
This is because Color::from_rgb_str()
gets mapped from gamma to linear but Color::rgb_hex()
doesn't map it back to gamma before printing the output. So that's definitely a bug, although I'll have to consult with @TrueDoctor to decide which part of that process should be fixed. I'm inclined to say that we want all colors to be linear, meaning we convert back to gamma before printing in Color::rgb_hex()
(then we have to trace any other usages of that function where we might be accidentally using the wrong linear/gamma and fix it in those too.)
When creating a color from a hex string with
Color::from_rgb_str()
, the hex string returned withColor::rgb_hex()
is different.Example:
I'm pretty sure this is not intended behavior