Enhancement suggestion: Color Calculator

Discussion about accessibility related issues, including WCAG and US Government Section 508 federal standards.
Post Reply
BfzPL
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 8
Joined: Sun Jul 22, 2018 8:44 am

Enhancement suggestion: Color Calculator

Post by BfzPL » Sat Nov 30, 2019 10:11 am

Hello Albert and all Validator friends together!
Since many years the Validator checks the contrast as well as the color-distance
for the foreground-background color-combination having in back the accessibility-
rules for A, AA, and AAA as well as US-508.
Often I get warnings for this class. But to solve these occurrences
I've to go to a website like https://webaim.org/resources/contrastchecker/ or
https://contrastchecker.com/ and try step by step many times to find
the nearest color to fulfill the rule. I know, the searched color may be changed
darker/lighter or in hue - for background or foreground. But normally I've a fix
color (from general style) and want to change only the second component.
So I think, there could be an Validator-integrated Color Calculator (dialog),
where we can (pre-filled colors from error-/warning-message) tell, which part
(fore- or background) we want to fix to which accessibility level. All formulas
are already inside of the Validator.
What is Your opinion about this suggestion of an enhanced Validator?

Best greetings, Thomas

User avatar
Lou
Rank V - Professional
Rank V - Professional
Posts: 282
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO
Contact:

Re: Enhancement suggestion: Color Calculator

Post by Lou » Sat Nov 30, 2019 2:50 pm

I like the idea IF this addition doesn't make the validator too "heavy."
Lou
Say what you will about Sisyphus. He always has work.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3453
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Enhancement suggestion: Color Calculator

Post by Albert Wiersch » Mon Dec 02, 2019 9:45 am

Hello,

Thank you for the suggestion. The thought of adding something like this has occurred to me before.

I think it would be best if I could just "integrate" with one of the online contrast checkers that already exists.

Perhaps I could add a link to the validator contrast message to the online contrast checker with parameters so the colors are already filled in (assuming the contrast checker allows this)?

Does this sound good?

If so, then what is your preference for the online contrast checker that will be linked to?
Image
Albert Wiersch

BfzPL
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 8
Joined: Sun Jul 22, 2018 8:44 am

Re: Enhancement suggestion: Color Calculator

Post by BfzPL » Sun Dec 08, 2019 5:54 am

Hello Albert,
sounds good! It is difficult to me which checker is best. This depends on the kind of accessibility fault: color distance or contrast.
Both named services from above check only the contrast and not for color distance.
As an additional starting point we could share https://github.com/leaverou/contrast-ratio
I for myself prefer WebAIM because it has an API You may integrate instead of calling the browser with a constructed link.
Maybe I'm able to extract all formulas and rules and provide such a service for all Validator friends via my homepage
(so it could be possible to get back the selected/clicked color directly in the document or copy cache to manually insert)...
Thanks a lot and have a good advent time.
Thomas

Post Reply