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

Add Color32::lerp_to_gamma #4627

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Add Color32::lerp_to_gamma #4627

merged 3 commits into from
Jun 6, 2024

Conversation

abey79
Copy link
Collaborator

@abey79 abey79 commented Jun 6, 2024

Add lerp_to_gamma utility function to Color32

@@ -235,4 +235,16 @@ impl Color32 {
a as f32 / 255.0,
]
}

/// Lerp this color towards `other` by `t` in gamma space.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring kindly provided by Copilot. I'm still largely confused by the linear vs. gamma distinction.

@abey79 abey79 added ecolor feature New feature or request labels Jun 6, 2024
crates/ecolor/src/color32.rs Outdated Show resolved Hide resolved
abey79 and others added 2 commits June 6, 2024 11:01
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
@emilk emilk merged commit 2545939 into master Jun 6, 2024
35 checks passed
@emilk emilk deleted the antoine/color-lerp branch June 6, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecolor feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants