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

feat: add luminance variable to FlxColor #3357

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

ninjamuffin99
Copy link
Member

Luminance is the "perceived" brightness of a color. Where computers treat/calculate RGB values the same, the human eye is more sensitive to green light, so our get_luminance getter weighs green stronger than red or blue in a brightness calculation.

rgb -> luminance from here: https://www.w3.org/TR/AERT/#color-contrast

@Geokureli Geokureli merged commit 5745552 into HaxeFlixel:dev Feb 4, 2025
11 checks passed
@Geokureli
Copy link
Member

sweet

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.

2 participants