Skip to content

FIX: restore category text color field #32915

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

Merged
merged 8 commits into from
Jun 2, 2025
Merged

Conversation

dbattersby
Copy link
Contributor

@dbattersby dbattersby commented May 26, 2025

Restores the category text/foreground color field that was removed in #32015.

We are also retaining the auto text color selection that was introduced and applying on background color change rather than when the form is saved. The text color algorithm has been changed from color brightness to use color difference instead, which appears to be more reliable.

Algorithm for color difference: https://www.w3.org/TR/AERT/#color-contrast

Screen.Recording.2025-05-26.at.1.46.00.PM.mov

Internal ref: /t/154650

@github-actions github-actions bot added the i18n PRs which update English locale files or i18n related code label May 26, 2025
@dbattersby dbattersby marked this pull request as ready for review May 26, 2025 10:49
@jjaffeux
Copy link
Contributor

LGTM, tested locally 🚀

I pushed a small commit to simplify tests, and yes I recommend a library for this color diff thing, but up to you 👍

@dbattersby dbattersby merged commit 6912025 into main Jun 2, 2025
16 checks passed
@dbattersby dbattersby deleted the add-category-text-field branch June 2, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n PRs which update English locale files or i18n related code
Development

Successfully merging this pull request may close these issues.

3 participants