Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve some oklaba inconsistencies #12526

Merged
merged 12 commits into from
Mar 17, 2024

Conversation

pablo-lua
Copy link
Contributor

Objective

  • Even if we have Laba and Oklcha colorspaces using lightness as the L field name, Oklaba doesn't do the same
  • The shorthand function for creating a new color should be named Oklaba::lab, but is named lch

Solution

  • Rename field l in Oklaba to lightness
  • Rename Oklaba::lch to Oklaba::lab

Changelog

Changed

  • Changed name in l field in Oklaba to lightness
  • Changed method name Oklaba::lch to Oklaba::lab

Migration Guide

If you were creating a Oklaba instance directly, instead of using L, you should use lightness

// Before
let oklaba = Oklaba { l: 1., ..Default::default() };

// Now
let oklaba = Oklaba { lightness: 1., ..Default::default() };

if you were using the function Oklaba::lch, now the method is named Oklaba::lab

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use labels Mar 17, 2024
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 17, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 17, 2024
Merged via the queue into bevyengine:main with commit 1610738 Mar 17, 2024
28 checks passed
@pablo-lua pablo-lua deleted the solve-oklaba-inconsistencies branch March 17, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants