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(color-scale): Add EZA_MAX_LUMINANCE env var like EZA_MIN_LUMINANCE #1380

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tim-tsm
Copy link

@tim-tsm tim-tsm commented Feb 15, 2025

Description

Some people can't focus light text on a dark background well. For accessibility, this commit adds a maximum luminance environment variable setting similar to the existing minimum luminance setting to keep the color-scale range readable on light backgrounds.

There are also a couple of trivial typos fixed in the documentation of the luminance max/min environment variables.

How Has This Been Tested?

It has been run with both default settings and the new EZA_MAX_LUMINANCE option set to various values on both MacOS and Arch Linux; EZA_MIN_LUMINANCE was also varied in tests especially on MacOS.

It passes cargo tests and does not produce any new output from cargo clippy.

I tried to run the nix integration tests inside a nixos/nix docker container with the flake feature turned on, but, although I could get nix develop to run, basically all other nix commands failed with permission errors on directories that didn't exist (eg /.cache), even with an unmodified eza checkout. I know nothing about nix and stopped at this point. As far as I can tell there aren't any existing tests of the color scale code anyway, but I am a relative novice at Rust so may have missed something.

Freed-Wu and others added 7 commits February 14, 2025 11:21
Some people can't focus light text on a dark background well. For
accessibility, this commit adds a maximum luminance environment variable
setting similar to the existing minimum luminance setting to keep the
color-scale range readable on light backgrounds.
MartinFillon
MartinFillon previously approved these changes Feb 18, 2025
@cafkafk cafkafk dismissed MartinFillon’s stale review February 20, 2025 05:32

The merge-base changed after approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

3 participants