bevy
bevy copied to clipboard
Add methods for getting and setting individual color channels for all color spaces.
Objective
Fixes #7746 except for making them const which is blocked on const float arithmetic.
Solution
Added a bunch more methods for getting and setting individual color channels for every color space.
Changelog
Added
-
X_Y
Get the Y value in linear X colorspace. -
set_X_Y
Set the Y value in X colorspace. -
with_X_Y
Returns this color with Y set to a new value in X colorspace.
For all the remaining channels and color spaces.
For the docs on all the set_
functions, it doesn't just return in the given kind, it also modified self.
I so much want to remove that file 🙁
Fixed in #920. Choice was made fairly arbitrarily; feel free to submit follow-up PRs for nits.