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

Create adr-002-fgColor-onEmphasis.md #1009

Merged
merged 7 commits into from
Jul 30, 2024

Conversation

lukasoppermann
Copy link
Contributor

@lukasoppermann lukasoppermann commented Jul 10, 2024

See ADR

@lukasoppermann lukasoppermann added the skip changeset Apply to PRs that should not result in a version bump. label Jul 10, 2024
@lukasoppermann lukasoppermann self-assigned this Jul 10, 2024
@lukasoppermann lukasoppermann requested review from a team as code owners July 10, 2024 19:05
Copy link

changeset-bot bot commented Jul 10, 2024

⚠️ No Changeset found

Latest commit: 42adec3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@langermank
Copy link
Contributor

I'd like to add some images and context to help us further discuss this decision.

Currently, in dark high contrast theme we invert fgColor-onEmphasis from white to black. This is the only theme we do this in. The decision to do this doesn't appear to be recorded, so we don't know for sure the reasoning. We're assuming this was done so that background colors could be more saturated and appear higher contrast against the default/muted backgrounds.

The inverted color is a bit challenging from a maintenance perspective, and increases the overall complexity of our color system. However, if it provides a better or more comfortable reading experience I'm personally fine with keeping it.

Below is a snippet of the existing experience. I know its difficult to evaluate out of context but just to give us a rough idea. On the left is default dark theme with both bgColor-default and bgColor-muted.

existing dark compared to dark high contrast themes

This is a proposed path forward where we use white text, but maybe introduce more bright border colors to add more contrast.

proposed theme comparing dark and dark high contrast

In the existing experience, the contrast ratios are as follows for the primary button:

colors ratio
bgColor-muted vs primary button bg 6.3
primary button bg vs primary button text 7.15
primary button border vs bgColor-muted 10.23

In the proposed solution, the contrast ratios are as follows:

colors ratio
bgColor-muted vs primary button bg 2.3
primary button bg vs primary button text 7.6
primary button border vs bgColor-muted 10.23

Without the border color, the background definitely loses some contrast against bgColor-muted. However, with white text it seems like we may actually increase the contrast.

Would love to hear some thoughts and opinions!

@github-actions github-actions bot temporarily deployed to Preview (Storybook) July 30, 2024 23:53 Inactive
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

I made some edits, but I feel confident moving forward with this decision since we've been internally testing it with no complaints.

@github-actions github-actions bot temporarily deployed to Preview (Storybook) July 30, 2024 23:54 Inactive
@langermank langermank merged commit 8213148 into main Jul 30, 2024
23 checks passed
@langermank langermank deleted the lukasoppermann-adr-002-fgColor-onEmphasis branch July 30, 2024 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset Apply to PRs that should not result in a version bump.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants