<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>contrast &#8211; Stacie Arellano</title>
	<atom:link href="https://www.staciearellano.com/tag/contrast/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.staciearellano.com</link>
	<description>Artist, Author, Web Maven</description>
	<lastBuildDate>Tue, 25 Feb 2020 17:42:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://www.staciearellano.com/wp-content/uploads/2019/09/cropped-bright-hair2019-32x32.jpg</url>
	<title>contrast &#8211; Stacie Arellano</title>
	<link>https://www.staciearellano.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">47314203</site>	<item>
		<title>The bright stuff</title>
		<link>https://www.staciearellano.com/the-bright-stuff/</link>
					<comments>https://www.staciearellano.com/the-bright-stuff/#comments</comments>
		
		<dc:creator><![CDATA[Stacie]]></dc:creator>
		<pubDate>Mon, 09 Sep 2019 22:15:24 +0000</pubDate>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[contrast]]></category>
		<guid isPermaLink="false">https://www.staciearellano.com/?p=1463</guid>

					<description><![CDATA[Understanding Web Accessibility Color Contrast Guidelines. TLDR? Check out my example on codepen. Scenario: You get a complaint about the contrast on your website, but&#8230;]]></description>
										<content:encoded><![CDATA[
<h4 class="wp-block-heading"><strong>Understanding Web Accessibility Color Contrast Guidelines. </strong></h4>



<div class="alignfull wp-block-ugb-cta ugb-cta fix-cta-spacing ugb-21ec140 ugb-cta ugb-cta--v2 ugb-cta--design-plain ugb-main-block ugb-main-block--inner-full ugb--has-block-background ugb--has-background-overlay" id=""><style>.ugb-21ec140 .ugb-cta__title{margin-bottom:7px !important;font-family:"Roboto Condensed",Sans-serif !important;font-weight:100;letter-spacing:0.5px;color:#c5dfb4}.ugb-21ec140 .ugb-cta__description{margin-bottom:10px !important;font-family:"Palatino Linotype",Palatino,Palladio,"URW Palladio L","Book Antiqua",Baskerville,"Bookman Old Style","Bitstream Charter","Nimbus Roman No9 L",Garamond,"Apple Garamond","ITC Garamond Narrow","New Century Schoolbook","Century Schoolbook","Century Schoolbook L",Georgia,serif !important;color:#ffffff}.ugb-21ec140 .ugb-button .ugb-button--inner{font-family:"Roboto Condensed",Sans-serif !important;font-weight:400;letter-spacing:0.5px}.ugb-21ec140 .ugb-button{background-color:#c4e558;border-radius:100px !important}.ugb-21ec140 .ugb-button .ugb-button--inner,.ugb-21ec140 .ugb-button svg{color:#3f4174}.ugb-21ec140 .ugb-button:before{border-radius:100px !important}.ugb-21ec140.ugb-cta{background-attachment:fixed;background-image:url(https://gambitph.github.io/Stackable/assets/block-design-assets/stack-cta-corporate-dark-01-01.jpg)}.ugb-21ec140.ugb-cta:before{opacity:0.5}</style><div class="ugb-inner-block"><div class="ugb-block-content"><div class="ugb-cta__item"><h3 class="ugb-cta__title"><strong>Feb. 19, 2020</strong></h3><p class="ugb-cta__description">This article has been expanded, edited<br> and posted to one of my favorite sites. </p><div class="ugb-button-container"><a class="ugb-button ugb-button--size-small ugb--hover-effect-lift" href="https://css-tricks.com/understanding-web-accessibility-color-contrast-guidelines-and-ratios/" target="_blank" rel="noopener noreferrer"><span class="ugb-button--inner">View updated article on CSS-Tricks.com</span></a></div></div></div></div></div>



<pre class="wp-block-verse"><em>It was a pleasure to work with the team from CSS-Tricks. --Stacie</em></pre>



<p class="wp-block-paragraph"></p>



<p class="has-text-align-right wp-block-paragraph"><strong>TLDR</strong>? <a href="https://codepen.io/Metahari/pen/VJrBrQ">Check out my example on codepen.</a></p>



<p class="wp-block-paragraph"><strong>Scenario</strong>: You get a complaint about the contrast on your website, but it seems perfectly readable to you. How can you know what&#8217;s wrong and how to fix it?</p>



<p class="wp-block-paragraph">There are some life hacks you can try out, like checking out your site on your phone out in bright sunlight, or adding a CSS filter to turn your whole site grayscale, but&#8230; <strong>you don&#8217;t have to trust your eyes.</strong> Your eyes may be bionically enhanced, but there is no way to be certain that everyone visiting your website has had the same cyber implants as you. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>



<p class="wp-block-paragraph">You can <strong>mathematically</strong> know if something has enough contrast. </p>



<p class="wp-block-paragraph">The guidelines for AA contrast is 4.5:1 for most text and 3:1 for large text. But… <strong>what do those numbers even mean</strong>? The ratio explains the difference between the Lightest color brightness vs the Darkest Color brightness. (relative luminance of each, actually, which makes it clearer, right?)</p>



<p class="wp-block-paragraph">Let&#8217;s start with an egregious example, putting two colors together on the text and the background. </p>



<p style="background-color:#888888;color:#1abc9c" class="has-text-color has-background has-large-font-size wp-block-paragraph"><strong>Title of Your Awesome Site</strong></p>



<div class="wp-block-image"><figure class="alignright"><img decoding="async" width="259" height="131" data-attachment-id="1465" data-permalink="https://www.staciearellano.com/the-bright-stuff/guten-contrast-warning/" data-orig-file="https://www.staciearellano.com/wp-content/uploads/2019/06/guten-contrast-warning.png" data-orig-size="259,131" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="guten-contrast-warning" data-image-description="" data-image-caption="" data-large-file="https://www.staciearellano.com/wp-content/uploads/2019/06/guten-contrast-warning.png" src="https://www.staciearellano.com/wp-content/uploads/2019/06/guten-contrast-warning.png" alt="Screenshot of contrast warning text that WordPress + Gutenberg gave me when I set teal text on gray background for the example above. It reads: This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color." class="wp-image-1465" srcset="https://www.staciearellano.com/wp-content/uploads/2019/06/guten-contrast-warning.png 259w, https://www.staciearellano.com/wp-content/uploads/2019/06/guten-contrast-warning-150x76.png 150w" sizes="(max-width: 259px) 100vw, 259px" /><figcaption>Hey! WordPress thinks my example of bad color contrast is bad too! </figcaption></figure></div>



<p class="wp-block-paragraph">Ok, you say. That teal on gray color combination is not exactly great, but I can mostly make it out. (I&#8217;m glad one of us can, it&#8217;s pretty much a muddy gray mess to me.)</p>



<p class="wp-block-paragraph">The contrast ratio for that fine piece of hypertext is <strong>1.47:1</strong></p>



<p class="wp-block-paragraph">To arrive at that number we require the use of&#8230; <strong>mathematics</strong>, with a side of understanding the differences between human and computer vision.</p>



<p class="wp-block-paragraph">I wanted a better understanding of what the contrast scores were actually checking. This journey taught me about the history of <a href="https://www.cambridgeincolour.com/tutorials/gamma-correction.htm">computer vision and a bit about biology</a>, and gave me  a <a href="https://www.wikihow.com/Solve-Decimal-Exponents">small review of some mathematics </a>I haven&#8217;t touched since college. </p>



<p class="wp-block-paragraph">I think I&#8217;ll just let the computer do the math for me from now on.  Trying to work out the details step by step on paper/with a calculator gave me a couple weeks of frustration. It was a lot of me figuring things out wrong, and comparing to the end result of existing contrast checkers.  </p>



<p class="wp-block-paragraph">Remember how the teachers&#8217; in school always wanted you to show your work, ie, how you got to the answer?  I made something to help us out. </p>



<p class="wp-block-paragraph">If you <a href="https://codepen.io/Metahari/pen/VJrBrQ?editors=0001">view this on codepen </a>with the console open, I output results step by step there, where I initially worked out the math before displaying things in the fun retro video game style.   Go ahead, <em>try our two example colors</em>: 1ABC9C and 888888.</p>



<p class="wp-block-paragraph">(You can also give it a try, inside this article, but you have more browser breathing room in a new window. Your choice! )</p>


<p class='codepen'  data-height='520' data-theme-id='0' data-slug-hash='VJrBrQ' data-default-tab='result' data-animations='run' data-editable='' data-embed-version='2'>
See the Pen Understanding the Contrast Ratio by Stacie (@Metahari) on CodePen.</p>




<p class="wp-block-paragraph">The digital devices around us make gamma encoding and decoding calculations all the time, to show us things on the screens that match up to our perception of how things appear to our eyes. </p>



<figure class="wp-block-pullquote"><blockquote><p>I just want my page to have proper contrast, what do I do?!</p></blockquote></figure>



<p class="wp-block-paragraph">There are a variety of<a href="https://www.staciearellano.com/accessibility-resources/"> accessibility resources </a>that you can can audit your site. </p>



<p class="wp-block-paragraph"><strong>First, identify </strong>areas that are not serving your accessibility needs. </p>



<div class="wp-block-image"><figure class="alignright"><img decoding="async" width="257" height="85" data-attachment-id="1467" data-permalink="https://www.staciearellano.com/the-bright-stuff/constrast-on-wave-tool/" data-orig-file="https://www.staciearellano.com/wp-content/uploads/2019/06/constrast-on-wave-tool.png" data-orig-size="257,85" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="constrast-on-wave-tool" data-image-description="" data-image-caption="" data-large-file="https://www.staciearellano.com/wp-content/uploads/2019/06/constrast-on-wave-tool.png" src="https://www.staciearellano.com/wp-content/uploads/2019/06/constrast-on-wave-tool.png" alt="Small snapshot of the top of the WAVE tool results, showing the 3rd button, contrast, selected." class="wp-image-1467" srcset="https://www.staciearellano.com/wp-content/uploads/2019/06/constrast-on-wave-tool.png 257w, https://www.staciearellano.com/wp-content/uploads/2019/06/constrast-on-wave-tool-150x50.png 150w" sizes="(max-width: 257px) 100vw, 257px" /><figcaption>The third button at the top of the WAVE sidebar results shows contrast related results.</figcaption></figure></div>



<p class="wp-block-paragraph">Use free tools Google&#8217;s <a href="https://developers.google.com/web/tools/lighthouse/">Lighthouse Audit </a>or the WEBAIM <a href="https://wave.webaim.org/extension/">WAVE tool</a> have places to identify contrast errors (along with other helpful accessibility tips).</p>



<p class="wp-block-paragraph"><strong>Then, follow </strong>the suggestions of the audit and use best practices to <span style="color: #313131;" class="ugb-highlight"><em>improve your scores, and remove the errors.</em></span><em> </em></p>



<p class="wp-block-paragraph">Once you identify contrast errors you can  try out some different options right there in the WAVE tool, click on the color box to pop open a color picker. Then play around until the errors go away, and you&#8217;ll know what you can replace in your code.  </p>



<p class="wp-block-paragraph"><strong>To finish, run the tests again</strong> to make sure your changes improved things. Congratulations! You just made your product better for all users, not just ones affected by the accessibility errors!.</p>



<p class="wp-block-paragraph"><strong>After all that, what comes next is up to you!</strong></p>



<p class="wp-block-paragraph">You can make it easier on yourself and start all new products with the goal of making them accessible. Make accessibility guidelines part of your <strong>requirements</strong> for both technology <em>AND</em> design. You&#8217;ll <strong>save yourself potentially hundreds</strong> of hours of remediation, and related legal complaints. </p>



<p class="wp-block-paragraph">US government/education websites are required to comply, but other industries are often taken to task for not making their sites equally available for all people. </p>



<p class="wp-block-paragraph">If you have the option, consider using established and tested frameworks and web libraries (like <a href="https://getbootstrap.com/">Twitter&#8217;s Bootstrap</a> or Google&#8217;s <a href="https://material.io/design/introduction/#">Material Design</a>) that have already figured out optimum contrast theme colors.  In many cases you can take just what you need (the CSS) or at least review their color palettes to inform choices.</p>



<p class="wp-block-paragraph">Derek Kay has reviewed a <a href="https://darekkay.com/blog/accessible-ui-frameworks/">list of web frameworks</a> with a focus on accessibility, which I suggest you read if you are looking for more options. </p>



<p class="wp-block-paragraph">The <a href="https://designsystem.digital.gov/design-tokens/color/overview/">US Web Design system </a>shows one way to solve color/contrast puzzles (ie, use their css token system that labels colors to make contrast differences super clear) but they also link to several very good resources for improving and understanding contrast. </p>



<p class="wp-block-paragraph">We took a deeper dive here than you ever really need to know when you just want to do is fix your contrast issues, but understanding what the ratio actually means should help you remember to <em>keep contrast in mind </em>when designing future sites, web apps, and other software. </p>



<p class="wp-block-paragraph">I&#8217;m not the ultimate subject expert, just a<strong> very very curious girl</strong>, who sometimes has issues reading things with low contrast. If you have any additional thoughts, corrections or further research to share, please leave a comment and I&#8217;ll amend this article, or the example. Thanks!  </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.staciearellano.com/the-bright-stuff/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1463</post-id>	</item>
	</channel>
</rss>
