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 Gamma ramp; properly cumulate temp, brightness, gamma, inversion #5

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

piater
Copy link
Contributor

@piater piater commented Sep 12, 2022

This works flawlessly for me, but check carefully - this is my first hackery in Rust, and I don't know Rust.

You probably want to squash the commits (sorry) on merging.

As an aside, I noticed that the symbols in the Waybar example (where Gamma uses γ) use Unicode code points from a private use area and are thus unlikely to be displayed properly for many users (including me).

@MaxVerevkin
Copy link
Owner

Thanks, it works for me too. The code looks good.

Not related to your PR (and probably wl-gammarelay-rs at all), but while testing this PR I noticed that zathura (PDF viewer) behaves quite weirdly when the colors are inverted: white becomes black but black... stays black. And then I realized that the settings don't apply to screenshots 😆

Inversion now flips the cumulated gamma ramp left-to-right (rather
than upside-donw), keeping any temperature, brightness and gamma
adjustments.

The script toggle-invert-display.sh inverts the display colors and
adjusts gamma in the inverted mode to compensate for perceptual
nonlinearity.
@MaxVerevkin MaxVerevkin merged commit 983b152 into MaxVerevkin:main Sep 12, 2022
@MaxVerevkin
Copy link
Owner

As an aside, I noticed that the symbols in the Waybar example (where Gamma uses γ) use Unicode code points from a private use area and are thus unlikely to be displayed properly for many users (including me).

These are from some extension font (maybe font-awesome, not sure). I can see them in my terminal but not "🌙" or "💡" (which are form unicode) (I guess I have to install something like noto-fonts-emoji).

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.

Adjust color temperature of inverted colormap: flip gamma ramp left-to-right (rather than upside-down)
2 participants