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

WCAG 3 APCA Lc contrast calculations #197

Open
Camulos opened this issue Jan 20, 2023 · 2 comments
Open

WCAG 3 APCA Lc contrast calculations #197

Camulos opened this issue Jan 20, 2023 · 2 comments
Labels
enhancement New feature or request UI Issues related to the Leonardo web interface

Comments

@Camulos
Copy link

Camulos commented Jan 20, 2023

Description

As the method of calculating contrast that is referenced in WCAG 2 has shown to not be very good at telling us contrast information that would be real world applicable, it would be helpful to get APCA Lc calculations included in the same tools.

Why do you need this feature?

My organisations need to (legally) follow the guidelines in WCAG 2.x, but we would also like to have contrasts that are actually readable. We would like to also see APCA-calculations, as it is likely that WCAG 3 will in 3-4 years be the legally required standard. We also know that (even if the algorithm is in beta) APCA-calculations is probably the best option we have to try to to make colour combinations that do not exclude.

Additional context

  • Nice to have the option to decide what font size and weight the foreground colours should be calculated for, and make 16px 400/normal be the default.
  • Nice to have the contrast calculation in a colour-system grid, pairing all colours in a system against each other
@Camulos Camulos added enhancement New feature or request UI Issues related to the Leonardo web interface labels Jan 20, 2023
@NateBaldwinDesign
Copy link
Collaborator

APCA is already a supported method of contrast generation in Leonardo. In the UI you can access this option in the Theme Settings menu.
image

In the Leonardo JavaScript module, you can define or set the method using the formula argument, which is 'wcag2' by default. Set to 'wcag3' for the APCA formula. See the Paramus/setter in theme.JS here https://github.com/adobe/leonardo/blob/main/packages/contrast-colors/theme.mjs

Note: this apparently was not documented in the Readme when the API was added in for APCA. I will log a different issue to resolve that.

@ohheyyeahthatsme
Copy link

have the APCA calculations been verified lately? When I test the same combo of colors in leonardo vs other tools, the calcs in leonard are wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UI Issues related to the Leonardo web interface
Projects
None yet
Development

No branches or pull requests

3 participants