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

Fix an error in calculating titleTextColor and bodyTextColor for PaletteColor. #18

Merged
merged 1 commit into from
Dec 18, 2019

Conversation

edwardez
Copy link
Contributor

@edwardez edwardez commented Apr 25, 2019

Fix luminance calculation by using relative luminance instead of lightness in HSLColor.

This results in a incorrect calculation of titleTextColor and bodyTextColor for PaletteColor.

This fixes flutter/flutter#31592

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@gspencergoog
Copy link
Contributor

@edwardez, could you please rebase to the HEAD of the repo and push it here? I think you were unlucky in that the ref you sync'd to had some other issues: these analysis problems don't seem to be related to your change.

If you don't have time, just say so and I'll create a new PR at HEAD with these changes in it.

…tness in HSLColor.

This results in a incorrect calculation of titleTextColor and bodyTextColor for PaletteColor.
@edwardez edwardez force-pushed the fix-luminance-calculation branch from be90fc4 to f61d405 Compare September 17, 2019 01:37
@edwardez
Copy link
Contributor Author

Done! PTAL :)

@goderbauer goderbauer merged commit 1a99427 into flutter:master Dec 18, 2019
gspencergoog pushed a commit to gspencergoog/packages that referenced this pull request Aug 19, 2020
stuartmorgan pushed a commit that referenced this pull request Oct 31, 2024
stuartmorgan pushed a commit that referenced this pull request Oct 31, 2024
color percentages can be floats and there can be whitespace everywhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[palette_generator] An error in calculating titleTextColor and bodyTextColor for PaletteColor
3 participants