Re: Use of colour

you can find code that will help to automatically set the color of your
background or your text colors based on a desired contrast and what your
wished for colors are, hard to say specifically as not sure what you are
using - I wrote something to do it in 2013 for Sass, but don't have it
anymore but it looks like this does the same
https://jonnykates.medium.com/automating-colour-contrast-ratios-with-sass-e201f3b52797

there is also a color-contrast function in css, but not really available in
anything by developer branches yet.

Hopefully you can just adjust your colors by hand to make the text either
1. slightly bigger 2. darker 3. the background lighter.


On Thu, Jul 13, 2023 at 1:45 PM Ms J <ms.jflz.woop@gmail.com> wrote:

> Hi Brian
>
> Just to clarify, I'm looking at the contrast between the black text and
> the white text to ensure that the difference in hue is sufficient to act as
> a change in lightness for the use of colour sc.
>
> Please can you advise on how to calculate the difference in contrast
> between the white text and black text taking the background colour into
> account. I don't think there's guidance re calculating lightness directly?
>
> Thanks
>
> Sarah
>
> Sent from Outlook for iOS <https://aka.ms/o0ukef>
> ------------------------------
> *From:* bryan rasmussen <rasmussen.bryan@gmail.com>
> *Sent:* Thursday, July 13, 2023 12:40:50 PM
> *To:* Ms J <ms.jflz.woop@gmail.com>
> *Cc:* w3c-wai-ig@w3.org <w3c-wai-ig@w3.org>
> *Subject:* Re: Use of colour
>
> Yes, the background is important as to whether or not the color has enough
> contrast, contrast is related to both the color and background it is on.
>
> On Thu, Jul 13, 2023 at 1:29 PM Ms J <ms.jflz.woop@gmail.com> wrote:
>
> Hello
>
> Please can someone advise on use of colour.
>
> I understand a change in hue of at least 3:1 contrast should indicate a
> sufficient change in lightness.
>
> However, is this dependent on the background colour staying constant? For
> example, if a focus indicator is a change in text colour from black to
> white, does that pass use of colour? The example in the screenshot I have
> attached says it does not pass (from the non-text contrast guideline). The
> change in text colour if you measure directly, white to black, does exceed
> 3:1. I would have thought this passed?
>
> Does it matter that the buttons background colour also changes? Does this
> break the ability to compare the lightness by just comparing the colour
> contrast ratio and checking it exceeds 3:1?
>
> Thanks
>
> Sarah
>
> Sent from Outlook for iOS <https://aka.ms/o0ukef>
>
>

Received on Thursday, 13 July 2023 12:10:51 UTC