bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Add methods for getting and setting individual color channels for all color spaces.

Open LiamGallagher737 opened this issue 2 years ago • 1 comments

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.

LiamGallagher737 avatar Feb 20 '23 04:02 LiamGallagher737

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 🙁

mockersf avatar Mar 14 '23 08:03 mockersf

I so much want to remove that file 🙁

I personally think using a crate like palette is the way to go

LiamGallagher737 avatar Mar 21 '23 00:03 LiamGallagher737

Fixed in #920. Choice was made fairly arbitrarily; feel free to submit follow-up PRs for nits.

alice-i-cecile avatar Aug 21 '23 16:08 alice-i-cecile