Abstract
Many websites do not satisfy minimum contrast requirements. One reason could be that designers must select colors through trial and error using contrast calculators. This paper presents a visual framework for working with color contrasts. The foreground and background colors are detected automatically, and views are presented to simulate how a design is viewed with different levels of reduced vision. Moreover, saturation-brightness plots are introduced to help make valid color choices. Color corrections are proposed and visualized.
Access provided by CONRICYT-eBooks. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
WCAG2.0 [1] gives concrete advice on how to ensure sufficient color contrast on web pages. The minimum requirement is a contrast ratio of 4.5:1 between the foreground body text and the background and a contrast ratio of 3:1 for headings (criterion 1.4.3), while the enhanced criterion (1.4.6) specifies a contrast of 7:1 for body text and 4.5:1 for headings. The recommendation is mathematical, and many web developers there-fore use contrast calculators for validation. Such contrast calculators are often used when a design is finished. Moreover, the user needs to experiment through trial and error to find alternative color combinations that meet the contrast requirements. The calculators require color vectors as input, and these may be cumbersome to retrieve.
This paper therefore explores an interactive visualization tool that allows a designer to visualize the effects of a design when perceived by individuals with low vision. Moreover, if the design does not meet the contrast requirements the tool suggests corrected colors and visualizes how the design appears with these colors. The tool is in-tended to be quick and convenient to use with the aim that it is used during the design phase instead of afterwards. It is not limited to html pages as it works with design mock-ups drawn in paint programs, ordinary user interface designs, mobile interfaces as well as html-pages. The framework is intended to work alongside the designers’ preferred tools.
2 Background
The successful reading of text is affected by factors such as correct input [2,3,4] and readability [5,6,7] which especially affect individuals with dyslexia [8]. Sufficient contrast is an absolute prerequisite to perceive text visually both by human and machine [9], and visual reading is the preferred modality for individuals with working vision [10, 11]. Individuals who are diagnosed as being technically blind employ other modalities such as audio [12, 13] and haptic feedback [14]. Early work on contrast of printed text was dominated by Tinker and colleagues [15]. Later works has studied contrast on various output devices such as CRT-displays [16], LCD-displays [17] and electronic paper [18]. Issues addressed include display quality [19], color combinations [20,21,22], polarity effects [23, 24] and text size [14].
WCAG2.0 gives concrete advice on what constitute sufficient contrast. Yet, a lack of contrast is a common problem. Since WCAG2.0 became part of the legislature on universal design in Norway, the Norwegian agency that oversees these regulations has found contrast problems in many cases since official audits were introduced. One may speculate to the reasons why a lack of contrast is still a problem despite the concrete requirements and color contrast tools. One reason may be that some designers are unaware of these requirements and tools. Another explanation may be that designers forget to check for contrast compliance. More likely is that designers use their impressionistic judgement of what constitute sufficient contrast.
There have been relatively few studies on the process of selecting colors and color picking interfaces. Exceptions include the exploration of bimanual color selection [25], color-selection for image retrieval [26], the effects of various visual color representations in color pickers [27], the design of palettes for color blindness [28] and software tools for color scheme design [29, 30]. Reinecke et al. [31] described a tool to compare colors under different lighting conditions. Webster [32] pointed out that there is no support for contrast calculations in traditional color selection tools.
In our previous work [33] we explored specialized color selection palettes with built-in contrast visualizations, both for RGB-based palettes [34] and HSB-based palettes [35]. We also visualized contrast requirements in the color spaces including RGB, HSB and CIElab [36]. Recently, Tigwell et al. [37] developed a specific tool to help designers select colors that satisfies the WCAG2.0 color contrast constraints.
3 Method
Three visualizations tools are proposed herein, namely contrast filters, contrast enhancers and saturation-brightness plots. The contrast filter is used to visually assess how well information in a design is perceived by users with different levels of reduced vision. The contrast enhancer is a tool that analyses the design and proposes corrected foreground colors that satisfy the WCAG2.0 contrast requirements. Finally, the saturation-brightness plot (SB-plot), is an analysis tool for understanding color choices. Foreground and background colors are plotted in the saturation-brightness plane where “safe” areas with sufficient contrast are indicated.
3.1 Contrast Filter
An image contrast filter was built using the luminosity contrast definitions in the WCAG2.0 documentation. For each pixel in the input image the contrast with the background color is computed. If the contrast meets the requirement the original pixel color is used, otherwise the background color is used.
To determine the background color of an image it is necessary to find the color that occur the most frequently. The following algorithm was devised. The image is dived into a 3 × 3 grid and the middle section is used for analysis. This approach means that borders and other peripheral elements do not affect the result. It assumes that the central part of the image is the most important. A 3D histogram is constructed from these pixel values according to the RGB components. Since pixel colors often vary the two least significant bits are ignored. The histogram had 64 × 64 × 64 bins. Next, the histogram entry with the highest count is the background color, and the entry with the second highest count is the foreground. Finally, the average color of the pixels with this histogram entry were calculated.
Figure 1 shows the original image of a text with low contrast, and the image committed to the contrast filter a threshold of 3:1. We can just about see the contours of the letter, but we are unable to perceive the text. Figure 2 shows the filter applied to Google Maps. With a contrast threshold of 3:1 some of the text is still readable, but the subtle indication of roads are gone. With a contrast threshold of 4.5:1 the text becomes much harder to perceive, and with a contrast threshold of 7:1 all the text disappeared. Only the notification (bell icon in the top right corner) survived.
Figure 3 shows the contrast filter applied to an image of a Microsoft Office color picker when choosing a white background. It is apparent which colors are contrast safe. Any type of color picker, or background color, can be used.
3.2 SB-Plots
The selected colors were plotted in the saturation-brightness plane to help designers understand their color choices, their freedom and the formal constraints. All varieties of hues are projected onto the same SB-plot. The rationale is that color choices are primarily focused around hues, and contrast adjustments are thus best performed by either adjusting the brightness or saturation. A SB-plot has two components, namely color choices and threshold regions. The horizontal axis represents brightness going from dark (left) to bright (right), and the vertical axis represents the saturation going from unsaturated (top) to saturated (bottom).
The background and foreground colors are represented using a green and red cross, respectively. Shades of grey are used to signal contrast levels where white signals invalid brightness and saturation choices in relation to the background color. Light, medium and dark grey denote contrast thresholds of 3:1, 4.5:1 and 7:1.
In addition, blue crosses indicate corrected foreground color suggestions. The corrected foreground colors were found by searching for the brightness-saturation coordinates that satisfy the given contrast thresholds yet with the shortest distance to the brightness-saturation coordinate of the background color. The foreground color is adjusted since it occupies fewer pixels. If the background color was altered the overall impression of change would be stronger. Also, fixing contrast problems in one area of the design may introduce new contrast problems elsewhere.
Figure 4 (left) shows the SB-plot for the Google Maps example in Fig. 2. Clearly, both the foreground (blue text) and the background has a high brightness, but the foreground is more saturated than the background. The foreground color is nearly meeting the contrast requirement of 3:1, but the shaded area shows that its intensity must be reduced. The less saturated the foreground color is the more the brightness needs to be reduced. Figure 4 (right) shows the SB-plot for the low-contrast text example in Fig. 1. Also, here the contrast is increased by reducing the brightness of the foreground color.
Figure 2 shows a design containing several colors. To focus only on a color-pair, each area of interest is cropped and inserted into the tool (see Fig. 5). Figure 5 also illustrates the SB-plots for text samples based on hue contrasts. The only way to improve the contrast in the red-blue example is to increase the brightness so it matches the brightness of the foreground, which may seem counterintuitive, and to reduce the saturation. To meet the strictest contrast requirements the foreground color needs to be highly unsaturated. This example illustrates that brightness adjustments may not always be the right solution. The green-red example (right) shows that sufficient contrast is achieved by either increasing or lowering the brightness of the foreground.
3.3 Contrast Enhancer
The suggested corrected foreground color is visualized by replacing the colors of the foreground pixels with the adjusted color. To increase the realism of the visualization we do not want to adjust the colors of other foreground colors. We therefore only altered the colors of pixels that were within a certain radius of the foreground pixel. A radius was chosen by taking half the distance between the foreground color and the background color. Figure 6 illustrates the contrast enhancement in practice for three examples used here-in given the three contrast thresholds. Note that no foreground color can be found that meets the 7:1 contrast requirement for the red-green text.
4 Conclusions
An approach to working with color contrasts was presented. The approach is intended to be simple and quick to use by hiding the technical details of color contrasts yet allowing the designer to rapidly and visually validate color choices. Using their native graphical tools designers can easily determine which colors on their color palette are valid. The tool thereby encourages the designers to select color combinations with sufficient contrast from the start. SB-plots are introduced to get a conceptual under-standing of the contrast problems and possible solutions which at the same time maintain the visual profile of the color scheme.
Next, contrast enhancements allow the designers to view designs with foreground colors corrected for contrast. The method is image-based and works on designs drawn in non-web design tools, screenshots of existing applications and web pages. Universal accessibility requires training [38], and the strategy presented may be used for pedagogical purposes.
References
W3C, WCAG2.0. https://www.w3.org/TR/WCAG20/
Sandnes, F.E., Huang, Y.P.: Chording with spatial mnemonics: automatic error correction for eyes-free text entry. J. Inf. Sci. Eng. 22, 1015–1031 (2006)
Sandnes, F.E.: Evaluating mobile text entry strategies with finite state automata. In: Proceedings of the 7th International Conference on Human Computer Interaction with Mobile Devices & Services, pp. 115–121. ACM (2005)
Sandnes, F.E., Jian, H.-L.: Pair-wise Variability Index: Evaluating the Cognitive Difficulty of Using Mobile Text Entry Systems. In: Brewster, S., Dunlop, M. (eds.) Mobile HCI 2004. LNCS, vol. 3160, pp. 347–350. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-28637-0_35
Eika, E.: Universally designed text on the web: towards readability criteria based on antipat-terns. Stud. Health Technol. Inform. 229, 461–470 (2016)
Eika, E., Sandnes, F.E.: Assessing the reading level of web texts for WCAG2.0 compliance—can it be done automatically? In: Di Bucchianico, G., Kercher, P. (eds.) Advances in Design for Inclusion. AISC, vol. 500, pp. 361–371. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-41962-6_32
Eika, E., Sandnes, F.E.: Authoring WCAG2.0-compliant texts for the web through text readability visualization. In: Antona, M., Stephanidis, C. (eds.) UAHCI 2016. LNCS, vol. 9737, pp. 49–58. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-40250-5_5
Berget, G., Sandnes, F.E.: Do autocomplete functions reduce the impact of dyslexia on information searching behaviour? a case of Google. J. Am. Soc. Inf. Sci. Technol. 67, 2320–2328 (2016)
Huang, Y.P., Chang, Y.T., Sandnes, F.E.: Ubiquitous information transfer across different platforms by QR codes. J. Mob. Multimed. 6, 3–13 (2010)
Sandnes, F.E.: What do low-vision users really want from smart glasses? faces, text and perhaps no glasses at all. In: Miesenberger, K., Bühler, C., Penaz, P. (eds.) ICCHP 2016. LNCS, vol. 9758, pp. 187–194. Springer, Cham (2016)
Sandnes, F.E., Eika, E.: Head-mounted augmented reality displays on the cheap: a DIY approach to sketching and prototyping low-vision assistive technologies. In: Antona, M., Stephanidis, C. (eds.) UAHCI 2017. LNCS, vol. 10278, pp. 167–186. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-58703-5_13
Sandnes, F.E., Tan, T.B., Johansen, A., Sulic, E., Vesterhus, E., Iversen, E.R.: Making touch-based kiosks accessible to blind users through simple gestures. Univ. Access Inf. Soc. 11, 421–431 (2012)
Gomez, J.V., Sandnes, F.E.: RoboGuideDog: guiding blind users through physical environments with laser range scanners. Procedia Comput. Sci. 14, 218–225 (2012)
Lin, M.W., Cheng, Y.M., Yu, W., Sandnes, F.E.: Investigation into the feasibility of using tactons to provide navigation cues in pedestrian situations. In: Proceedings of the 20th Australasian Conference on Computer-Human Interaction: Designing for Habitus and Habitat, pp. 299–302. ACM (2008)
Tinker, M.: A, Paterson: D. G.: Studies of typographical factors influencing speed of reading. J. Appl. Psychol. 15, 241 (1931)
Mathews, M.L.: Visual performance with coloured CRT displays: research update. Appl. Ergon. 20, 58 (1989)
Stone, D.S., Fisher, K., et al.: Adults’ prior exposure to print as a predictor of the legibility of text on paper and laptop computer. J. Read. Writ. 11, 1–28 (1999)
Lin, P.H., Lin, Y.T., et al.: Effects of anti-glare surface treatment, ambient illumination and bending curvature on legibility and visual fatigue of electronic papers. Displays 29, 25–32 (2008)
Nasanen, R., Karlsson, J., et al.: Display quality and the speed of visual letter search. Displays 22, 107–113 (2001)
Greco. M, Stucchi. N., et al.: On the portability of computer-generated presentations: the effect of text-background color combinations on text legibility. Hum. Factors 50, 821–833 (2008)
Hall, R.H., Hanna, P.: The impact of web page text-background colour combinations on readability, retention, aesthetics and behavioural intention. Behav. Inform. Technol. 23, 183–195 (2004)
Ling, J., van Schaik, P.: The effect of text and background colour on visual search of Web pages. Displays 23, 223–230 (2002)
Buchner, A., Baumgartner, N.: Text – background polarity affects performance irrespective of ambient illumination and colour contrast. Ergon. 50, 1036–1063 (2007)
Lee, D.S., Shieh, K.K., et al.: Effect of character size and lighting on legibility of electronic papers. Displays 29, 10–17 (2008)
Gonzalez, B., Latulipe, C.: BiCEP: bimanual color exploration plugin. In: CHI 2011 Extended Abstracts on Human Factors in Computing Systems, pp. 1483–1488. ACM (2001)
van den Broek, E.L., Kisters, P.M.F., Vuurpijl, L.G.: Design guidelines for a content-based image retrieval color-selection interface. In: Dutch HCI 2004, pp. 14–18. ACM (2004)
Douglas, S.A., Kirkpatrick, A.E.: Model and representation: the effect of visual feedback on human performance in a color picker interface. ACM T. Graph. 18, 96–127 (1999)
Troiano, L., Birtolo, C., Miranda, M.: Adapting palettes to color vision deficiencies by genetic algorithm. In: Keijzer, M. (ed.) Proceedings of the 10th Annual Conference on Genetic and Evolutionary Computation, pp. 1065–1072. ACM (2008)
Meier, B.J., Spalter, A.M., Karelitz, D.B.: Interactive color palette tools. IEEE Comput. Graphics Appl. 24, 64–72 (2004)
Moretti, G., Lyons, P.: Tools for the selection of colour palettes. In: Proceedings of the SIGCHI-NZ Symposium on Computer-Human Interaction, pp. 13–18. ACM (2002)
Reinecke, K., Flatla, D. R., Brooks, C.: Enabling designers to foresee which colors users cannot see. In: Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems, pp. 2693–2704. ACM (2016)
Webster, M.: Integrating color usability components into design tools. Interactions 21, 56–61 (2014)
Sandnes, F.E.: On-screen colour contrast for visually impaired readers: selecting and exploring the limits of WCAG2.0 colours. In: Black, A., Lund, O., Walker, S. (eds.) Information Design: Research and Practice, pp. 405–416. Routledge (2016)
Sandnes, F.E., Zhao, A.: An interactive color picker that ensures WCAG2.0 com-pliant color contrast levels. Procedia-Comput. Sci. 67, 87–94 (2015)
Sandnes, F.E., Zhao, A.: A contrast colour selection scheme for WCAG2. 0-compliant web designs based on HSV-half-planes. In: Proceedings of SMC2015, pp. 1233–1237. IEEE (2015)
Sandnes, F.E.: Understanding WCAG2.0 color contrast requirements through 3D color space visualization. Stud. Health Technol. Inform. 229, 366–375 (2016)
Tigwell, G.W., Flatla, D.R., Archibald, N.D.: ACE: a colour palette design tool for balancing aesthetics and accessibility. ACM Trans. Access. Comput. 9 (2017). Article no. 5
Whitney, G., Keith, S., Bühler, C., Hewer, S., Lhotska, L., Miesenberger, K., Sandnes, F.E., Stephanidis, C., Velasco, C.A.: Twenty five years of training and education in ICT Design for All and Assistive Technology. Technol. Disabil. 3, 163–170 (2011)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
Cite this paper
Sandnes, F.E. (2018). An Image-Based Visual Strategy for Working with Color Contrasts During Design. In: Miesenberger, K., Kouroupetroglou, G. (eds) Computers Helping People with Special Needs. ICCHP 2018. Lecture Notes in Computer Science(), vol 10896. Springer, Cham. https://doi.org/10.1007/978-3-319-94277-3_7
Download citation
DOI: https://doi.org/10.1007/978-3-319-94277-3_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-94276-6
Online ISBN: 978-3-319-94277-3
eBook Packages: Computer ScienceComputer Science (R0)