The site Check My Colours checks contrast ratio, brightness difference & color difference of a given site.

Garland's testing hit 114 elements:

  • Luminosity Contrast Ratio: 22 failures
  • Brightness difference: 12 failures
  • Color difference: 44 failures

Seven's testing hit 113 elements:

  • Luminosity Contrast Ratio: 20 failures
  • Brightness difference: 15 failures
  • Color difference: 41 failures

There are similar visibility issues with many of the themes that come with the color module & garland that I first outlined here. That issue was primarily there to provide means to check color contrast when using the color module.

Most of the color combinations provided with the color module fail:

  • Blue Lagoon (Default) - Barely passes with a luminosity ratio of 4.5 - Suggest link color of #135684
  • Aquamarine - Barely passes with a luminosity ratio 4.5 - Suggest text color of #565555
  • Bluemarine - Barely passes with a luminosity ratio 6 - Suggest link color #294664
  • Citrus Blast - Fails with a luminosity ratio of 4.2. - Suggest link color #5e4f09
  • Greenbeam - Barely passes with a luminosity ratio 5.5 - Suggest link color #0d4e06
  • Mercury - It's deadly both text & link color fail - Suggest link color #315061 & text color #585858
  • Nocturnal - Barely passes with a luminosity ratio 5.7 - Suggested link color #46497f
  • Olivia - Fails with a luminosity ratio 3.3 - Suggested link color #41561b
  • Pink Plastic - Fails with a luminosity ratio 3.8 - Suggested text color #605454
  • Shiny Tomato - deadly tomato both text & link color fail - Suggest link color #7b0c0c & text color #393f39

I'm not sure how to resolve this though as I'm not very good with colors and just increasing the contrast isn't going produce something that also looks good.

I wanted to bring this up as a separate issue but need to bring in a design person to suggest a better set of colors.

Comments

cliff’s picture

Issue tags: -needs theming help

Don't have time to say much right now, but take a look at Contrast-A.

[Editing to fix name of color tool. Doh!]

mgifford’s picture

Thanks Cliff. It's easy to find where there are problems, but I do think someone with a better sense of design should choose the alternatives.

I've got some other color tools for accessibility listed here too:
http://delicious.com/mgifford/color+accessibility

cliff’s picture

That rules me out. But of the color assessment tools I've found, Contrast-A seems to be best suited for a designer to use in building an accessible and aesthetically pleasing palette. Soon I'll post an explanation of how to use it here so anyone with an eye for design who follows this issue can see how to use this free tool to propose reasonable solutions. (That used to say "Later today," but Christmas preparations got away from me.)

Then I'll add the same information to the accessibility wiki you've set up (or some other appropriate place for designers to look for guidance).

roborn’s picture

subscribe

jensimmons’s picture

subscribe

mgifford’s picture

Drupal 7 really shouldn't be shipped with default themes that have accessibility issues for low vision users.

Can someone suggest options for higher contrast colors? I can write up a patch if someone else can produce a list of better colors. If anyone wants the lists of colors for these, please let me know and I can produce a broader list of what each colors are involved in each combination.

Bojhan’s picture

I am sorry, but Drupal 7 can be. As much as I would agree, that it shouldn't - the problems you proposed are very hard to fix, far harder then creating the initial list. But I do love the iniative, we should indeed look more closely into this.

Can you provide screenshots with occurrences that need to be fixed? I want to focus on fixing Seven first.

mgifford’s picture

Issue tags: +needs theming help
mgifford’s picture

Title: Ensuring Proper Color Contrast for Garland » Check My Colours on Garland & Seven
Component: Garland theme » Seven theme
Issue tags: -garland
StatusFileSize
new11.95 KB

Thanks Bojhan. Here are the biggest colour challenges so far in my review of Seven using the Colour Contrast Analyzer extension for Firefox.

The "Edit Shortcuts" link fails Luminosity Contrast Ratio, Difference in Brightness, and Difference in Colour with #bbbbbb #666666
2.99:1 (fail) 85 (fail) 255 (fail)

There are problems with Difference in Colour in these combinations:
#ffffff #666666
#0074bd #e0e0d8
#5a5a5a #ffffff

Used in (on /admin/config/development/performance):
- Remove from Default shortcuts.
- Clear cache & Save configuration buttons (all buttons)
- The minimum amount of time that will elapse before the caches are recreated. (description text for FAPI)

The colour difference is defined by Juice Studios as:


(maximum (Red value 1, Red value 2) - minimum (Red value 1, Red value 2)) + (maximum (Green value 1, Green value 2) - minimum (Green value 1, Green value 2)) + (maximum (Blue value 1, Blue value 2) - minimum (Blue value 1, Blue value 2))

EDIT: Discussion of Seven moved to #740756: Ensuring Proper Color Contrast for Seven

mgifford’s picture

StatusFileSize
new184.21 KB

Garland has a number of issues too. Again most critical issues first.

The required for * fails #ffae00 #edf5fa
1.68:1 (fail) 64 (fail) 339 (fail)

Powered by Drupal both #898989 #ffffff & #027ac6 #ffffff fail.

Sidebar links don't have enough contrast for the size:
Log in using OpenID, Cancel OpenID login, Create new account & Request new password
#027ac6 #edf5fa 4.14:1 (AA pass for large text only) 148 (pass) 410 (fail)

The title fails the validation, but I think that's a limitation in the plugin.

Bojhan’s picture

Hop by IRC sometime, to discuss this - I am unsure if we can truely solve many of these errors.

For example :
The difference between #666666 and #ffff is pretty hard to fix, as it would mean all of our descriptions become very visisble.

The difference between #0074bd and #e0e0d8 ... mean we would choose a diffrent base color for all links?

Edit Shortcuts, has been made very gray for a reason - I can understand it fails tests. I am unsure the trade off, of choosing a higher contrast is in alignment with the useage contrast design decision.

Anyways, come by IRC - we might be able to find a sweet spot where we can actually fix all of these issues. Understandably, the most critical are also the hardest to fix.

mgifford’s picture

StatusFileSize
new1.58 KB

Here's a sample patch for Seven. It definitely improves visibility of a few items by increasing contrast.

The only place where I really draw on the on focus is in the links. This is important for the breadcrumbs as the font is really quite small so a larger contrast is important.

'Edit shortcuts' is already using this approach and on focus/hover it's readable

Bojhan’s picture

Can you provide screenshots?

mgifford’s picture

Sure thing.

EDITING: Adding descriptions about the images that are included. The patch I included before this does the following for Seven:

greater-contrast.png

- Gives greater contrast for the breadcrumbs on focus & hover
- Darkens the text in the buttons as well as the description text below the forum elements

greater-contrast-2.png

- Increases the contrast in the shortcuts

And yes, this is for better WCAG 2.0 support.

mgifford’s picture

I also ran into this problem with the contrast in the error messages.

div.error {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#A32C01 none repeat scroll 0 0;
color:#FFFFFF;
font-weight:bold;
}

There's enough of a window in the attachments to also show firebug/color contrast evaluation tools in the same screen.

EDIT: I also made the text bold so that it was very clear to read.

EDIT2: Adding descriptions to the images attached. Both of these were evaluated with the Firefox ColourChecker module:

screen-capture-23.png

- WCAG 2.0 AA & AAA errors with the color contrast for the Drupal warning messages

screen-capture-24.png

- Demonstration of how this would be fixed if the background was darker.

cliff’s picture

Mike, my apologies for being absent from this issue for so long. I can make a few suggestions for colors, not based on a background in design but based on my use of Contrast-A to determine the smallest change in color that will produce AAA compliance with WCAG 2.0. Using the hexadecimal values you mentioned in #9 and #10, I get these results, where the numbers in parentheses are the corresponding luminance contrast ratios for people with normal vision and these ratios exceed the WCAG minimum guideline only to the extent necessary to meet that guideline for at least some forms of colorblindness:

  • #bbbbbb and #666666: Change #666666.
    • Keeping it pure (or nearly pure) gray:
      • #4c4b4b works if used only for large text (4.52:1)
      • #2d2b2b works if also used in small text (7.20:1)
    • Allowing it to pick up a tinge of red:
      • For large text, #4d4848 (4.68)
      • For small text, #2e2b2b (7.30)
  • #ffffff and #666666: Passes for large text (5.74:1), but is used for small text. To fix, change #666666:
    • Keeping it pure (or nearly pure) gray, we need #515050 (8.03:1)
    • Allowing it to pick up a tinge of red, we need #524b4b (8.51:1)
  • #0074bd and #e0e0d8: This color pair contrasts fairly well (3.73:1; passes at level AA) for large text, but not even pure white (4.96:1) or pure black (4.23:1) has sufficient contrast to this shade of blue (#0074bd) to pass at AAA for small text. Consider two options:
    • To pass at AA for small text (which is the same as passing at AAA for large text), change the background (#e0e0d8):
      • Keeping about the same tinge of yellow, #f6f6ec works (4.56:1) except for people with an extremely rare form of colorblindness called tritanopia, for whom we can achieve no better than AA compliance for large text with this shade of blue (#0074bd)
      • Removing all yellow, #f4f4f4 works (4.51:1) — again, except for folks with tritanopia
    • Or we can keep the background the same if we do something with that shade of blue:
      • And reach AAA compliance for large text, but only AA for small, with #0164a3 (4.71:1) — again, except for people with tritanopia, for whom this achieves only level AA compliance with large text
      • Or reach AAA compliance for nearly everyone with #004a79 (7.01) — this time, picking up AA compliance for small text and AAA compliance for large text for even the people with tritanopia.
  • #5a5a5a and #ffffff: At 6.89:1, this pair is so close to compliance for all text at level AAA that only a very slight adjustment to the gray needs to be made. Make it #505050 (8.06:1) and it will work for everyone.
  • #ffae00 and #edf5fa: At 1.68:1, this pair requires the greatest change so far:
    • Assuming we want the nearly white #edf5fa to stay nearly white, the closest yellow with sufficient contrast to pass at level AAA is #5f4000 (8.57:1) — a deep golden brown, hardly the same effect.
    • Assuming we want the yellow to remain the same, the white has to become quite a dark color. At one extreme is a deep blue, #001c2e (9.37:1); at the other, a deep charcoal gray, #171717 (9.65:1).
  • #898989 and #ffffff: As with #666666 and #ffffff, we can't lighten the white (#ffffff), so we need to look at darkening the gray. And the minimum required change is the same:
    • Keeping it pure (or nearly pure) gray, we need #515050 (8.03:1)
    • Allowing it to pick up a tinge of red, we need #524b4b (8.51:1)
  • #027ac6 and #ffffff: This combination is not terrible — at 4.56:1, it passes at level AAA for large text (level AA for small text) for almost everyone. Again, people with tritanopia will find it difficult to read. To improve the situation:
    • #005b96 (7.15:1) works for everyone but people with tritanopia, who still would see it fairly well (level AAA for large text).
    • #004a7a (9.28:1) reaches level AAA with small text even for people with tritanopia.
  • #027ac6 and #edf5fa: It's unlikely that we would want a single shade to morph into two different colors, so let's see what the same adjustments we just made to the blue will do against this very light gray:
    • #005b96 isn't quite dark enough (6.48:1); we would need to darken it to #004674 (8.94:1).
    • #004a7a (8.42:1) almost works, but people with tritanopia will still have trouble unless we darken it to #004674 (8.94:1).

Again, I am making no aesthetic pronouncements. I am merely identifying the colors that will bring this theme into compliance with WCAG 2.0 while making the smallest qualitative change possible to the palette.

Bojhan’s picture

Issue tags: +needs theming help

Since we are talking about visual changes, it might be easier to just provide screenshots with before / after.

cliff’s picture

Easier for others, maybe. I'm still fighting that learning curve and don't have the time to dig into the code. I really do wish I could help more, but I am offering the information that I am able to in hopes that it will help people solve the problem.

Too little contrast seems to be endemic not just in Drupal but in modern Web design in general.

Everett Zufelt’s picture

Issue tags: +garland

Agree that d7 shouldn't, but will likely need to, ship with these colour issues. I notice that this issue is filed against seven. Would it be helpful to file against each core theme that has colour contrast problems to see if we can get more assistance with the issue? Perhaps that will only make it more difficult because the thread will be separeted.

Have you tested Stark as well?

Everett Zufelt’s picture

@mgifford wrote: "The site Check My Colours checks contrast ratio, brightness difference & color difference of a given site"

You mention that there are a number of failures in Seven and Garland. Can you please provide us with a little more information about what test or standard is being used? I assume WCAG 2.0 AA, would that be correct?

mgifford’s picture

Issue tags: +garland, +Seven

I've tried to add descriptions for 14 & 15 so that I'm more clear. And yes, these are for WCAG 2.0 AA & also AAA (although AAA's more than we can shoot for at this point).

Check My Colours I believe is checking for WCAG 2.0 primarily. Where it is compliant the screen shows AA, so I assume this is what is intended.

The initial post though was actually targeting the color module specifically. By going through the color module's array:

modules/color/color.module

  $names = array(
    'base' => t('Base color'),
    'link' => t('Link color'),
    'top' => t('Header top'),
    'bottom' => t('Header bottom'),
    'text' => t('Text color'),
  );

And applying that to Garland's defalt schema themes/garland/color/color.inc I've just applied my suggestions to the original post.

  // Pre-defined color schemes.
  'schemes' => array(
    '#0072b9,#135684,#2385c2,#5ab5ee,#494949' => t('Blue Lagoon (Default)'),
    '#464849,#2f416f,#2a2b2d,#5d6779,#494949' => t('Ash'),
    '#55c0e2,#000000,#085360,#007e94,#565555' => t('Aquamarine'),
    '#d5b048,#6c420e,#331900,#971702,#494949' => t('Belgian Chocolate'),
    '#3f3f3f,#294664,#6598cb,#6598cb,#000000' => t('Bluemarine'),
    '#d0cb9a,#5e4f09,#efde01,#e6fb2d,#494949' => t('Citrus Blast'),
    '#0f005c,#434f8c,#4d91ff,#1a1575,#000000' => t('Cold Day'),
    '#c9c497,#0d4e06,#03961e,#7be000,#494949' => t('Greenbeam'),
    '#ffe23d,#a9290a,#fc6d1d,#a30f42,#494949' => t('Mediterrano'),
    '#788597,#315061,#a9adbc,#d4d4d4,#585858' => t('Mercury'),
    '#5b5fa9,#46497f,#0a2352,#9fa8d5,#494949' => t('Nocturnal'),
    '#7db323,#41561b,#b5d52a,#7db323,#191a19' => t('Olivia'),
    '#12020b,#1b1a13,#f391c6,#f41063,#605454' => t('Pink Plastic'),
    '#b7a0ba,#7b0c0c,#a1443a,#f21107,#393f39' => t('Shiny Tomato'),
    '#18583d,#1b5f42,#34775a,#52bf90,#2d2d2d' => t('Teal Top'),
  ),

I do hope that this clarifies things. There are tools that do fairly easily announce where there are problems with contrast. The problem outlined here #134359: Warn users about contrast problems when using the color module was that it would be good if the Color module verified color combinations, but as @webchick states, it's bad to ship when the defaults don't validate.

cliff’s picture

StatusFileSize
new274.73 KB
new274.83 KB
new274.25 KB
new280.5 KB
new272.05 KB
new281.61 KB
new274.79 KB
new280.8 KB

I'm not set up to do screenshots of a site displaying a number of different color schemes, but I can provide the electronic equivalent of the color chips you can get at the paint store. Each of the attached PDFs is like a set of paint chips for one of the problematic color pairs @mgifford identified in 9 and 10. In each case:

  • The name of the file is the respective problematic color pair.
  • The first image shows the degree of contrast of that color pair.
  • Each of the next images shows the possible fixes I identified in 16 for this color pair.
  • If in 16 I mentioned the possibility of varying both colors in a pair, the last image for that pair repeats the original problematic color pair to make comparison somewhat easier.

Taken together, these images show the kinds of changes that will produce WCAG-compliant degrees of contrast. I hope that someone who is more facile than I with theming and Drupal can use this information to create at least one screenshot each of Seven and Garland with these or equally effective fixes implemented.

cliff’s picture

StatusFileSize
new299.94 KB
new299.83 KB
new305.6 KB
new305.05 KB
new305.06 KB
new304.03 KB
new305.19 KB
new305.16 KB
new307.16 KB
new301.67 KB
new304.55 KB
new306.68 KB
new303.33 KB
new304.16 KB

For those who need visuals, these are the color schemes @mgifford referred to in 21. Each color scheme is named for the corresponding set of color combinations, or "palette," for Garland as obtained from the color module. These color combinations were mentioned in the introduction to this issue.

Each palette includes images I will call "color chips," arranged in this order:

  1. The named palette's base color against each of that palette's other colors, in this order:
    • base + link
    • base + header top
    • base + header bottom
    • base + text
  2. The link color against the remaining colors, in this order:
    • link + header top
    • link + header bottom
    • link + text
  3. The header top color against the remaining colors, in this order:
    • header top + header bottom (Note: We actually want the contrast to be fairly low for this combination. If this contrast level is too high, it will be impossible to choose foreground colors that have sufficient contrast to both the top and the bottom of the header.)
    • header top + text
  4. The header bottom color against the text color
  5. A series of five chips to show each of the five colors against white

Information in each PDF file explains the symbols used and the color combination's degree of compliance (or failure to comply) with WCAG 2.0. (My apologies if the words and labels in these PDFs are not themselves accessible. I have no control over the tool that created the PDFs and did not have time to remediate them.)

Bojhan’s picture

Heh, as much as I appriciate this I think we are all looking for these context - in the Seven theme.

mgifford’s picture

@Bojhan, can you comment on #14 & #15 which are focused on the admin side.

Most of these color comment issues in this thread are targeting Garland's color schemes. The last comment by Cliff is focused on Garland's scheme's for color pallets. Thanks for this Cliff!

seutje’s picture

subscribe, can we split off garland, or split off seven and set this issue to Garland theme component?

mgifford’s picture

Title: Check My Colours on Garland & Seven » Ensuring Proper Color Contrast for Garland
Component: Seven theme » Garland theme
Issue tags: -Seven

@seuje good call.

I created #740756: Ensuring Proper Color Contrast for Seven and have renamed this one.

Removed Seven from Component & tags.

kat3_drx’s picture

Title: Check My Colours on Garland & Seven » Ensuring Proper Color Contrast for Garland
Component: Seven theme » Garland theme
Issue tags: +garland

I have a patch up for review for the "Edit shortcuts" link native to the Shortcuts toolbar here #795268: Shortcut "Edit shortcuts" link has insufficient color contrast ratio.

Would love some review/critique. This is my first time originating an issue and patch. *bundle of nerves*

mgifford’s picture

This is still an issue for the pre-defined color schemes.

Jeff Burnz’s picture

I don't think we can fix this - its a monumental task requiring a lot of design changes & reviews. We can leave this open but frankly its just too late.

I realize peeps probably don't want to hear that but we should have thought about this 18 months ago, in which case things may have been quite different, however for D7 I think we have to let this go, and simply remove Garland from core in D8.

mgifford’s picture

Version: 7.x-dev » 8.x-dev

It was thought about 9 months ago, but agreed that it's a pretty huge challenge.

It certainly should be something that is addressed in D8 and I'm willing to bump as a criterion for future versions.

mgifford’s picture

Are we going to be dropping Garland in D8? I'd hoped so, but...

mgifford’s picture

Status: Active » Closed (won't fix)

Looks like Garland's getting removed from core later in the week.