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

enh(theming): RGBY contrast #38211

Merged
merged 4 commits into from Jun 6, 2023
Merged

enh(theming): RGBY contrast #38211

merged 4 commits into from Jun 6, 2023

Conversation

Pytal
Copy link
Member

@Pytal Pytal commented May 12, 2023

Summary

Existing --color-[error|warning|success|info] variables are currently used for various borders, icons, and text

They have been adjusted to meet the minimum 3:1 contrast ratio for “Graphical Objects and User Interface Components”, see https://webaim.org/resources/contrastchecker/

New variables --color-[error|warning|success|info]-text are added for text which meet the minimum 4.5:1 contrast ratio on light #ffffff and dark #171717 backgrounds

Contrast

/* contrast ratio on light background #ffffff */
:root {
  --color-error: #e9322d;        /* 4.23 */
  --color-error-text: #e7201b;   /* 4.55 */
  --color-warning: #c28900;      /* 3.06 */
  --color-warning-text: #996c00; /* 4.67 */
  --color-success: #3fa857;      /* 3.02 */
  --color-success-text: #318344; /* 4.71 */
  --color-info: #006aa3;         /* 5.85 */
  --color-info-text: #006aa3;    /* 5.85 */
}

/* contrast ratio on dark background #171717 */
:root {
  --color-error: #e9322d;        /* 4.23 */
  --color-error-text: #ea403b;   /* 4.52 */
  --color-warning: #c28900;      /* 5.87 */
  --color-warning-text: #c28900; /* 5.87 */
  --color-success: #3fa857;      /* 5.93 */
  --color-success-text: #3fa857; /* 5.93 */
  --color-info: #006aa3;         /* 3.07 */
  --color-info-text: #0088d1;    /* 4.65 */
}

Screenshots

Screenshot
Before image
After image

Checklist

@Pytal Pytal added the 2. developing Work in progress label May 12, 2023
@Pytal Pytal self-assigned this May 12, 2023
@Pytal Pytal added this to the Nextcloud 28 milestone Jun 6, 2023
@Pytal Pytal added 3. to review Waiting for reviews accessibility design Design, UI, UX, etc. and removed 2. developing Work in progress labels Jun 6, 2023
@Pytal Pytal marked this pull request as ready for review June 6, 2023 00:43
@Pytal Pytal changed the title [WIP] enh(theming): RYG contrast enh(theming): RGBY contrast Jun 6, 2023
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

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

Code looks good

@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jun 6, 2023
Pytal added 4 commits June 6, 2023 08:47
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
@Pytal Pytal merged commit 3ef53a2 into master Jun 6, 2023
37 checks passed
@Pytal Pytal deleted the enh/a11y-ryg-color branch June 6, 2023 17:30
@Pytal Pytal mentioned this pull request Jul 17, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish accessibility design Design, UI, UX, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants