Skip to content

Preserve color space on Saturation changes (Consistency with Hue and Luminance traits)#24413

Open
coreh wants to merge 2 commits into
bevyengine:mainfrom
coreh:saturation-preserve-color-space
Open

Preserve color space on Saturation changes (Consistency with Hue and Luminance traits)#24413
coreh wants to merge 2 commits into
bevyengine:mainfrom
coreh:saturation-preserve-color-space

Conversation

@coreh
Copy link
Copy Markdown
Contributor

@coreh coreh commented May 23, 2026

Objective

  • Make the Saturation trait match the behavior of Hue and Luminance traits, by preserving the underlying color space of the modified color

Solution

  • Assign to the interior mutably borrowed value in the underlying color space, instead of just returning a new value in an arbitrary color space (Color::Hsla())

Testing

  • Manual testing. Trivial change, behavior already consistent with existing traits

@coreh coreh added A-Color Color spaces and color math D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 23, 2026
@coreh coreh changed the title Preserve color space on saturation changes (Consistency with other traits) Preserve color space on Saturation changes (Consistency with Hue and Luminance traits) May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Color Color spaces and color math D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant