-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solve some oklaba inconsistencies (#12526)
# 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 ```rust // 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`
- Loading branch information
Showing
3 changed files
with
61 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters