30239-notes/02.perception-and-color/slides.html

448 lines
134 KiB
HTML
Raw Permalink Normal View History

2024-11-13 23:50:35 +00:00
<!DOCTYPE html><html lang="en-US"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0"><meta name="apple-mobile-web-app-capable" content="yes"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta property="og:type" content="website"><meta name="twitter:card" content="summary"><style>@media screen{body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button{appearance:none;background-color:initial;border:0;color:inherit;cursor:pointer;font-size:inherit;opacity:.8;outline:none;padding:0;transition:opacity .2s linear;-webkit-tap-highlight-color:transparent}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:disabled,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:disabled,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:disabled,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:disabled{cursor:not-allowed;opacity:.15!important}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:hover,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:hover,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:hover,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:hover{opacity:1}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:active,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:active,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:hover:active,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:hover:active{opacity:.6}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:not(:disabled),body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:not(:disabled),body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:hover:not(:disabled),body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:hover:not(:disabled){transition:none}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=prev],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=prev],body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button.bespoke-marp-presenter-info-page-prev{background:#0000 url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSI1IiBkPSJNNjggOTAgMjggNTBsNDAtNDAiLz48L3N2Zz4=") no-repeat 50%;background-size:contain;overflow:hidden;text-indent:100%;white-space:nowrap}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=next],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=next],body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button.bespoke-marp-presenter-info-page-next{background:#0000 url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSI1IiBkPSJtMz
2024-09-27 22:28:23 +00:00
* Marp default theme.
*
* @theme default
* @author Yuki Hattori
*
* @auto-scaling true
* @size 16:9 1280px 720px
* @size 4:3 960px 720px
2024-11-13 23:50:35 +00:00
*/div#\:\$p > svg > foreignObject > section{--base-size-4:calc(var(--marpit-root-font-size, 1rem) * 0.25);--base-size-8:calc(var(--marpit-root-font-size, 1rem) * 0.5);--base-size-16:calc(var(--marpit-root-font-size, 1rem) * 1);--base-text-weight-normal:400;--base-text-weight-medium:500;--base-text-weight-semibold:600;--fontStack-monospace:ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;}div#\:\$p > svg > foreignObject > section [data-theme=light],div#\:\$p > svg > foreignObject > section{color-scheme:light;--focus-outlineColor:#0969da;--fgColor-default:#1f2328;--fgColor-muted:#636c76;--fgColor-accent:#0969da;--fgColor-success:#1a7f37;--fgColor-attention:#9a6700;--fgColor-danger:#d1242f;--fgColor-done:#8250df;--bgColor-default:#fff;--bgColor-muted:#f6f8fa;--bgColor-neutral-muted:#afb8c133;--bgColor-attention-muted:#fff8c5;--borderColor-default:#d0d7de;--borderColor-muted:#d0d7deb3;--borderColor-neutral-muted:#afb8c133;--borderColor-accent-emphasis:#0969da;--borderColor-success-emphasis:#1a7f37;--borderColor-attention-emphasis:#bf8700;--borderColor-danger-emphasis:#cf222e;--borderColor-done-emphasis:#8250df;--color-prettylights-syntax-comment:#57606a;--color-prettylights-syntax-constant:#0550ae;--color-prettylights-syntax-constant-other-reference-link:#0a3069;--color-prettylights-syntax-entity:#6639ba;--color-prettylights-syntax-storage-modifier-import:#24292f;--color-prettylights-syntax-entity-tag:#0550ae;--color-prettylights-syntax-keyword:#cf222e;--color-prettylights-syntax-string:#0a3069;--color-prettylights-syntax-variable:#953800;--color-prettylights-syntax-brackethighlighter-unmatched:#82071e;--color-prettylights-syntax-brackethighlighter-angle:#57606a;--color-prettylights-syntax-invalid-illegal-text:#f6f8fa;--color-prettylights-syntax-invalid-illegal-bg:#82071e;--color-prettylights-syntax-carriage-return-text:#f6f8fa;--color-prettylights-syntax-carriage-return-bg:#cf222e;--color-prettylights-syntax-string-regexp:#116329;--color-prettylights-syntax-markup-list:#3b2300;--color-prettylights-syntax-markup-heading:#0550ae;--color-prettylights-syntax-markup-italic:#24292f;--color-prettylights-syntax-markup-bold:#24292f;--color-prettylights-syntax-markup-deleted-text:#82071e;--color-prettylights-syntax-markup-deleted-bg:#ffebe9;--color-prettylights-syntax-markup-inserted-text:#116329;--color-prettylights-syntax-markup-inserted-bg:#dafbe1;--color-prettylights-syntax-markup-changed-text:#953800;--color-prettylights-syntax-markup-changed-bg:#ffd8b5;--color-prettylights-syntax-markup-ignored-text:#eaeef2;--color-prettylights-syntax-markup-ignored-bg:#0550ae;--color-prettylights-syntax-meta-diff-range:#8250df;--color-prettylights-syntax-sublimelinter-gutter-mark:#8c959f;}div#\:\$p > svg > foreignObject > section [data-theme=dark],div#\:\$p > svg > foreignObject > section:where(.invert){color-scheme:dark;--focus-outlineColor:#1f6feb;--fgColor-default:#e6edf3;--fgColor-muted:#8d96a0;--fgColor-accent:#4493f8;--fgColor-success:#3fb950;--fgColor-attention:#d29922;--fgColor-danger:#f85149;--fgColor-done:#ab7df8;--bgColor-default:#0d1117;--bgColor-muted:#161b22;--bgColor-neutral-muted:#6e768166;--bgColor-attention-muted:#bb800926;--borderColor-default:#30363d;--borderColor-muted:#30363db3;--borderColor-neutral-muted:#6e768166;--borderColor-accent-emphasis:#1f6feb;--borderColor-success-emphasis:#238636;--borderColor-attention-emphasis:#9e6a03;--borderColor-danger-emphasis:#da3633;--borderColor-done-emphasis:#8957e5;--color-prettylights-syntax-comment:#8b949e;--color-prettylights-syntax-constant:#79c0ff;--color-prettylights-syntax-constant-other-reference-link:#a5d6ff;--color-prettylights-syntax-entity:#d2a8ff;--color-prettylights-syntax-storage-modifier-import:#c9d1d9;--color-prettylights-syntax-entity-tag:#7ee787;--color-prettylights-syntax-keyword:#ff7b72;--color-prettylights-syntax-string:#a5d6ff;--color-prettylights-syntax-variable:#ffa657;--color-prettylights-syntax-brackethighlighter-unmatched:#f85149;--color-prettylights-syntax-brackethighlighter-angle:#8b949e;--color-prettylights-syntax-inv
</style></head><body><div class="bespoke-marp-osc"><button data-bespoke-marp-osc="prev" tabindex="-1" title="Previous slide">Previous slide</button><span data-bespoke-marp-osc="page"></span><button data-bespoke-marp-osc="next" tabindex="-1" title="Next slide">Next slide</button><button data-bespoke-marp-osc="fullscreen" tabindex="-1" title="Toggle fullscreen (f)">Toggle fullscreen</button><button data-bespoke-marp-osc="presenter" tabindex="-1" title="Open presenter view (p)">Open presenter view</button></div><div id=":$p"><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;rainbow.jpg&quot;);"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="1" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-27 22:28:23 +00:00
<h1 id="perception--color">Perception &amp; Color</h1>
<h2 id="capp-30239">CAPP 30239</h2>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="2" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="today">Today</h2>
<ul>
<li>What matters most when creating a visualization?</li>
<li>How does human <strong>perception</strong> factor into visualization design?</li>
<li>Understanding <strong>color</strong>, and computational representations of it.</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="3" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="what-is-the-most-important-question-when-creating-a-visualization">What is the most important question when creating a visualization?</h2>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="4" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="what-is-the-most-important-question-when-creating-a-visualization-1">What is the most important question when creating a visualization?</h2>
2024-09-28 21:51:09 +00:00
<ul>
<li><s>Where will the data come from?</s>
<li><s>What type of chart do I use?</s></li>
<li>Who is the audience?</li>
</ul>
2024-09-27 22:28:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="5" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="audience-first">Audience First</h2>
<ul>
<li>Who are you presenting to?</li>
<li>How familiar are they with the data?</li>
<li>What is their numerical &amp; visualization literacy?</li>
<li>Via what medium will they receive the information?</li>
<li>What are you trying to do? (Persuade, Inform, Inspire?)</li>
</ul>
<p><em>Only now can we start thinking about data and presentation.</em></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="6" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="perception">Perception</h2>
<ul>
<li><strong>Selective</strong> - We can only pay attention to so much.</li>
<li><strong>Patterns</strong> - Our brains are pattern-matching machines, audience will benefit from intentional patterns &amp; be distracted by unintentional ones.</li>
<li><strong>Limited working memory</strong> - We hold a very limited set of information in our minds at once.</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="7" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="what-do-you-see">What do you see?</h2>
2024-09-28 21:51:09 +00:00
<div class="container">
<div class="col">
2024-09-29 18:18:05 +00:00
<p><img src="viz-1.png" alt="" /></p>
2024-09-28 21:51:09 +00:00
</div><div class="col">
2024-09-27 22:28:23 +00:00
<pre is="marp-pre" data-auto-scaling="downscale-only"><code class="language-python">alt.Chart(random_df).mark_point().encode(
alt.X(<span class="hljs-string">&quot;a&quot;</span>),
alt.Y(<span class="hljs-string">&quot;c&quot;</span>),
alt.Color(<span class="hljs-string">&quot;b&quot;</span>),
alt.Size(<span class="hljs-string">&quot;c&quot;</span>),
alt.Shape(<span class="hljs-string">&quot;a:N&quot;</span>),
alt.Fill(<span class="hljs-string">&quot;b&quot;</span>),
alt.Opacity(<span class="hljs-string">&quot;b&quot;</span>),
)
</code></pre>
2024-09-28 21:51:09 +00:00
</div>
</div>
2024-09-27 22:28:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="8" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="what-do-you-see-1">What do you see?</h2>
2024-09-28 21:51:09 +00:00
<div class="container">
<div class="col">
2024-09-29 18:18:05 +00:00
<p><img src="viz-2.png" alt="" /></p>
2024-09-27 22:28:23 +00:00
<pre is="marp-pre" data-auto-scaling="downscale-only"><code>alt.Chart(random_df).mark_line().encode(
x=&quot;a&quot;,
y=&quot;c&quot;,
)`
</code></pre>
2024-09-28 21:51:09 +00:00
</div>
</div>
2024-09-27 22:28:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="9" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="effectiveness-revisited">Effectiveness Revisited</h2>
<p><img src="effectiveness.png" alt="" style="width:800px;" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="10" lang="en-US">
2024-09-28 21:51:09 +00:00
<div class="container">
<div class="col">
2024-09-27 22:28:23 +00:00
<p><strong>Altair Channels</strong></p>
<ul>
<li>Position (<code>X, Y</code>)</li>
<li>Angle (<code>Angle</code>)</li>
<li>Area (<code>Radius</code>, <code>Size</code>)</li>
<li>Hue, Saturation (<code>Color</code>)</li>
<li>Texture (<code>Opacity</code>, <code>Fill</code>)</li>
<li>Shape (mark type, <code>Shape</code>)</li>
</ul>
2024-09-28 21:51:09 +00:00
</div>
<div class="col">
2024-09-27 22:28:23 +00:00
<p><strong>What about?</strong></p>
<ul>
<li>Length</li>
<li>Slope</li>
<li>Volume</li>
<li>Density</li>
<li>Connection</li>
<li>Containment</li>
</ul>
2024-09-28 21:51:09 +00:00
</div>
</div>
2024-09-27 22:28:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="11" lang="en-US">
2024-09-27 22:28:23 +00:00
<p><strong>Derived Properties</strong></p>
<ul>
<li>Length/Area - size of bars (<code>X</code>, <code>Y</code>)</li>
<li>Slope &amp; Density - affected by scale</li>
<li>Connection - ex. layering of lines w/ points</li>
<li>Containment - achieved with layering</li>
</ul>
<p>What about <em>volume</em>?</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="12" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="stevens-power-law">Stevens' Power Law</h2>
<p>Stevens (1975): Human response to sensory stimulus is characterized by a power law with different exponents with different stimuli.</p>
2024-09-28 21:51:09 +00:00
<p>perception = (magnitude of sensation)<sup>a</sup></p>
<p>Smaller <sup>a</sup> exponent: harder to perceive changes.</p>
2024-09-27 22:28:23 +00:00
<p>Stevens measured values of a by exposing people to varied stimulus and asking them to compare magnitudes.</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="13" lang="en-US">
2024-09-28 21:51:09 +00:00
<div class="container"><div class="col">
2024-09-27 22:28:23 +00:00
<p><img src="stevens.png" alt="" /></p>
2024-09-28 21:51:09 +00:00
</div><div class="col">
2024-09-27 22:28:23 +00:00
<table>
<thead>
<tr>
<th>Continuum</th>
<th>Exponent</th>
</tr>
</thead>
<tbody>
<tr>
2024-09-29 18:18:05 +00:00
<td>Color <strong>Brightness</strong></td>
2024-09-27 22:28:23 +00:00
<td>0.33-0.5</td>
</tr>
<tr>
<td>Smell</td>
<td>0.6</td>
</tr>
<tr>
<td>Loudness</td>
<td>0.67</td>
</tr>
<tr>
<td><strong>Depth Perception</strong></td>
<td>0.67</td>
</tr>
<tr>
<td>Area</td>
<td>0.7</td>
</tr>
<tr>
<td>2D Planar Position</td>
<td>1.0</td>
</tr>
<tr>
<td>Warmth</td>
<td>1.3-1.6</td>
</tr>
<tr>
2024-09-29 18:18:05 +00:00
<td>Color <strong>Saturation</strong></td>
2024-09-27 22:28:23 +00:00
<td>1.7</td>
</tr>
<tr>
<td>Electric Shock</td>
<td>3.5</td>
</tr>
</tbody>
</table>
2024-09-28 21:51:09 +00:00
</div></div>
2024-09-27 22:28:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="14" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="3d-graphs">3D Graphs</h2>
<p><img src="stunning-3d-chart.jpg" alt="" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="15" lang="en-US">
2024-09-27 22:28:23 +00:00
<p><img src="datavizproject.png" alt="" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="16" lang="en-US">
2024-09-27 22:28:23 +00:00
<p><img src="3d-scatter.png" alt="" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="left" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;scatter-matrix.png&quot;);"></figure></div></section></foreignObject><foreignObject width="50%" height="720" x="50%"><section id="17" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="left" style="--marpit-advanced-background-split:50%;">
2024-09-27 22:28:23 +00:00
<h2 id="instead-of-3d-graphs">Instead of 3D Graphs</h2>
<ul>
2024-09-28 21:17:56 +00:00
<li>Find other channels: hue &amp; size are good candidates. (bubble chart)</li>
<li>Or make multiple 2D graphs with XY/YZ/XZ pairs.</li>
2024-09-27 22:28:23 +00:00
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="left" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="18" lang="en-US">
2024-09-27 23:18:23 +00:00
<h2 id="what-is-color">What is Color?</h2>
<p>Wavelengths of light are perceived as particular colors:<br />
<img src="linear_visible_spectrum.svg.png" alt="" /></p>
2024-09-29 18:18:05 +00:00
<p>What's missing?</p>
2024-09-27 22:28:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;cone-fundamentals.png&quot;);"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="19" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-27 23:18:23 +00:00
<h2 id="color--the-eye">Color &amp; the Eye</h2>
<h3 id="rods">Rods</h3>
<ul>
<li>spread throughout retina</li>
<li>more sensitive in low light conditions</li>
2024-09-29 18:18:05 +00:00
<li>brightness (&quot;lightness&quot;)</li>
2024-09-27 23:18:23 +00:00
</ul>
<h3 id="cones">Cones</h3>
<ul>
<li>3 types with peak sensitivity at different frequencies</li>
<li>concentrated in center of eye</li>
<li>less sensitive in low light conditions</li>
2024-09-29 18:18:05 +00:00
<li>hue &amp; saturation</li>
2024-09-27 23:18:23 +00:00
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="20" lang="en-US">
2024-09-28 21:17:56 +00:00
<h2 id="spectrum-vs-what-we-see">Spectrum vs. What We See</h2>
<p>What we actually see is always a blend of multiple peaks.</p>
<p>This is impacted by ambient light conditions, as well as quirks of our visual processing.</p>
<p><img src="the-dress.jpg" alt="" style="height:400px;" /></p>
<p>In actuality, multiple combinations of light can give same color (<strong>metamers</strong>).</p>
2024-09-27 23:18:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="21" lang="en-US">
2024-09-28 21:17:56 +00:00
<h2 id="chromatic-adaptation">Chromatic Adaptation</h2>
<p><img src="demo-bw-illusion-andrew-steele.gif" alt="" /></p>
<p>Source: Andrew Steele <a href="https://www.youtube.com/channel/UC-XYsDNh4-886rMNLnnwR_w">https://www.youtube.com/channel/UC-XYsDNh4-886rMNLnnwR_w</a></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;xkcd-color-map.png&quot;);"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="22" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-27 23:18:23 +00:00
<h2 id="color-naming">Color Naming</h2>
2024-09-28 21:17:56 +00:00
<p>Color naming is highly subjective, and research has shown that the ability to name a color correlates highly with the ability to distinguish it.</p>
<p>Be particularly careful with blue/green boundaries, as there are significant cultural differences.</p>
<p>Source: <a href="https://blog.xkcd.com/2010/05/03/color-survey-results/">https://blog.xkcd.com/2010/05/03/color-survey-results/</a></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;hok-uk.svg&quot;);background-size:600px auto;"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="23" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-28 21:17:56 +00:00
<h2 id="cultural-considerations">Cultural Considerations</h2>
<ul>
2024-09-28 21:51:09 +00:00
<li>American audiences associated <span color="red">red</span> &amp; <span color="blue">blue</span> with political parties on any map in a political context.</li>
<li>Also international meaning of <span color="red">red</span> &amp; <span color="blue">blue</span> is flipped: red is left, blue is right.</li>
2024-09-28 21:17:56 +00:00
<li>Most other colors have contradictory meanings depending on culture. For example, yellow might be chosen to denote success (parts of Africa) or be associated with death (Middle East).</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;colorblind.jpg&quot;);background-size:600px auto;"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="24" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-29 18:18:05 +00:00
<h2 id="color-vision-deficiency">Color Vision Deficiency</h2>
<p>More accurate name for what is commonly known as colorblindness.</p>
<ul>
<li>Red-Green CVD - most common
<ul>
<li>four types: Dueteranomaly and Protanomaly (mild) to Protanopia and Dueteranopia (complete)</li>
</ul>
</li>
<li>Tritanomaly/Tritanopia: blue/green and yellow/red confusion.</li>
<li>rarest, complete lack of color vision, usually corresponds to other vision issues as well</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;cmyk.svg&quot;);"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="25" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-28 21:17:56 +00:00
<h2 id="color-on-a-page">Color on a Page</h2>
<p>Ink absorbs light, so we work with subtractive blending. Our base colors are cyan, magenta, and yellow. To save on ink costs, we throw in black/contrast as well.</p>
<p>We call this CMYK color.</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;additive.png&quot;);"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="26" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-28 21:17:56 +00:00
<h2 id="color-on-a-screen">Color on a Screen</h2>
<p>Screens emit light, which means we use <strong>additive blending</strong> of red, green, and blue light. Every pixel of a screen can emit these three colors in different intensities.</p>
2024-09-29 18:18:05 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;rgb-khan.jpg&quot;);background-size:700px auto;"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="27" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-29 18:18:05 +00:00
<h2 id="color-spaces">Color Spaces</h2>
<p>Ways of describing a color mathematically, usually have 3 components to match our perception of color:</p>
<ul>
<li>RGB (early photography)</li>
<li>CIE XYZ (1931)</li>
<li>HSB/HSV/HSL (1970s)</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;rgb-pixels.jpg&quot;);"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="28" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-28 21:17:56 +00:00
<p>A common way to refer to colors is by their intensity in each of these three channels.</p>
2024-09-29 18:18:05 +00:00
<p><span style="color: rgb(0% 100% 0%)">this is 0% red, 100% green, 0% blue intensity (#00ff00)</span><br />
<span style="color: rgb(20% 60% 20%)">this is 20% red, 60% green, 20% blue intensity: (#143c14)</span><br />
<span style="color: #ff00ff">this is 100% red, 0% green, 100% blue intensity: #ff00ff</span></p>
<p>This is sometimes expressed in hexadecimal:</p>
<p><img src="hexrgb.png" alt="" style="height:120px;" /></p>
2024-09-28 21:17:56 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="29" lang="en-US">
2024-09-28 21:17:56 +00:00
<h3 id="rgb-space-as-a-cube">RGB space as a cube</h3>
<p><img src="LinearRGBCube.png" alt="cube" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="30" lang="en-US">
2024-09-28 21:17:56 +00:00
<h3 id="rgb-as-pair-plots">RGB as pair plots</h3>
<p><img src="RGBPairPlots.png" alt="pair plots" /></p>
<p>Remember this trick for your own 3-dimensional data!</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="31" lang="en-US">
2024-09-28 21:17:56 +00:00
<p><img src="TriangleSliceRGB.png" alt="" style="height:500px;" /></p>
<p>A slice through the middle of the cube gives colors of comparable brightness. (You may have seen such a triangle in color pickers.)</p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="32" lang="en-US">
2024-09-28 21:17:56 +00:00
<h2 id="hsl">HSL</h2>
<p><img src="HSL.png" alt="" style="height:500px;" /></p>
<p>An alternative color space that's very useful for visualization is HSL color space.</p>
2024-09-29 18:18:05 +00:00
<p>Hue, Saturation, Lightness | <a href="https://hslpicker.com/">https://hslpicker.com/</a></p>
2024-09-28 21:17:56 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="33" lang="en-US">
2024-09-28 21:17:56 +00:00
<h2 id="aside-what-about-alpha">Aside: What about &quot;alpha&quot;?</h2>
<p>You will often see a fourth channel: RGB<strong>A</strong>, HSL<strong>A</strong>.</p>
<p>This is known as alpha transparency (translucency).</p>
<p>This has to do with how the program in question <em>blends</em> the colors. The final pixel values on the screen will still be converted to RGB components.</p>
<ul>
<li>Use sparingly.</li>
<li>Variations are very subtle, and background dependent.</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;cie-xyz.png&quot;);"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="34" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-29 18:18:05 +00:00
<h2 id="cie-rgb--xyz--cielab">CIE (RGB / XYZ / CIELAB)</h2>
<p>Based on human perception experiments where people would adjust dials to recreate colors out of red, green, and blue light.</p>
<p>First from 1920s, revised in 1970s.</p>
<p><em>Commission internationale de l'éclairage</em> (Illumination)</p>
2024-09-28 21:17:56 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;gamut2.png&quot;);"></figure></div></section></foreignObject><foreignObject width="50%" height="720"><section id="35" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="right" style="--marpit-advanced-background-split:50%;">
2024-09-28 21:17:56 +00:00
<h2 id="screen-gamut">Screen Gamut</h2>
<p>Screens can't show the entire range of visible colors accurately, they define a &quot;gamut&quot;. Since ~1996 most devices aim at a standard gamut to ensure similar representations of color, but even high end devices are not perfectly aligned.</p>
<p>Projectors (like the one you're likely viewing this on) usually have skewed gamut.</p>
<p>Moral of the story: <strong>Consider your medium!</strong></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="right" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="36" lang="en-US">
2024-09-28 21:17:56 +00:00
<h2 id="what-does-all-this-mean-for-visualization">What does all this mean for visualization?</h2>
<p>Color choices should be made with respect to:</p>
2024-09-27 23:18:23 +00:00
<ul>
2024-09-28 21:17:56 +00:00
<li>medium (screen vs. print, type of screen)</li>
<li>audience (culture, vision differences, expectations)</li>
<li>differentiability</li>
2024-09-27 23:18:23 +00:00
</ul>
2024-10-11 17:38:17 +00:00
<p>Using HSL to build a palette allows you to choose uniform brightness/saturation and pick hues as close together/far apart as needed.</p>
2024-09-27 23:18:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="37" lang="en-US">
2024-09-28 21:17:56 +00:00
<h2 id="role-of-color">Role of Color</h2>
<ul>
<li><strong>Identify</strong> - Different color per category/actor.
<ul>
<li>opt for distinct hues</li>
</ul>
</li>
<li><strong>Group</strong> - Group like entities using same/like colors.
<ul>
<li>often with similar hues</li>
</ul>
</li>
<li><strong>Layer</strong> - Overlay different information while keeping contrast.
<ul>
<li>saturation differences very important to not overwhelm eye</li>
</ul>
</li>
<li><strong>Highlight</strong> - Call out important/relevant information.
<ul>
<li>brightness and hue differences important</li>
</ul>
</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="38" lang="en-US">
2024-09-27 23:18:23 +00:00
<h2 id="color-channels--data-types">Color Channels &amp; Data Types</h2>
2024-09-29 18:18:05 +00:00
<h3 id="lightness-is-perceived-as-ordered">Lightness is perceived as ordered</h3>
<p>Good for <strong>Ordinal</strong> variables</p>
<p><img src="ordinal.png" alt="" style="height:50px;" /></p>
<p><strong>Quantitative</strong> (Continuous) variables harder to discern</p>
<p><img src="qual.png" alt="" style="height:50px;" /></p>
<h3 id="hue-typically-unordered">Hue typically unordered</h3>
<p><strong>Nominal</strong> variables.</p>
<p><img src="nominal.png" alt="" style="height:50px;" /></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="39" lang="en-US">
2024-09-27 23:18:23 +00:00
<h3 id="types-of-palettes">Types of Palettes</h3>
<ul>
2024-09-29 18:18:05 +00:00
<li>Qualitative - Nominal data</li>
<li>Sequential - Quantitative data</li>
<li>Diverging - Data with a meaningful zero-point (increase/decrease, more/less)</li>
2024-09-27 23:18:23 +00:00
</ul>
2024-09-29 18:18:05 +00:00
<p><img src="palette-types.jpg" alt="" /></p>
2024-09-27 23:18:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="left" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;vega-schemes.png&quot;);background-size:600px auto;"></figure></div></section></foreignObject><foreignObject width="50%" height="720" x="50%"><section id="40" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="left" style="--marpit-advanced-background-split:50%;">
2024-09-29 18:18:05 +00:00
<h3 id="hue-separation">Hue Separation</h3>
<p>Pick distinct hues for unrelated variables.</p>
<p>Grouped schemes can be used where there are relationships among the categories.</p>
<p><a href="https://vega.github.io/vega/docs/schemes/">https://vega.github.io/vega/docs/schemes/</a></p>
2024-09-27 23:18:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="left" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="41" lang="en-US">
2024-10-05 03:56:07 +00:00
<h2 id="color-tips">Color Tips</h2>
<ul>
<li>Aim for no more than ~6 colors that need to be distinguished.</li>
<li>Colors should be distinct &amp; differentiable by name.</li>
<li>Be mindful of cultural considerations &amp; symbolism.</li>
<li>Ensure color schemes chosen appropriately for types of data.</li>
<li>&quot;Get it right in black &amp; white&quot;</li>
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="left" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;vega-schemes-bw.jpg&quot;);background-size:600px auto;"></figure></div></section></foreignObject><foreignObject width="50%" height="720" x="50%"><section id="42" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="left" style="--marpit-advanced-background-split:50%;">
2024-09-28 21:17:56 +00:00
<h2 id="get-it-right-in-black--white">&quot;Get it right in black &amp; white&quot;</h2>
<p>A common mantra among visual designers.</p>
2024-09-29 18:18:05 +00:00
<p>Ensure that your hues have different brightness levels.</p>
2024-09-28 21:17:56 +00:00
<p>Ensure that you aren't using hue alone for your image.</p>
2024-09-27 23:18:23 +00:00
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="left" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section lang="en-US" data-marpit-advanced-background="background" data-marpit-advanced-background-split="left" style="--marpit-advanced-background-split:50%;"><div data-marpit-advanced-background-container="true" data-marpit-advanced-background-direction="horizontal"><figure style="background-image:url(&quot;contrast.png&quot;);background-size:600px auto;"></figure></div></section></foreignObject><foreignObject width="50%" height="720" x="50%"><section id="43" lang="en-US" data-marpit-advanced-background="content" data-marpit-advanced-background-split="left" style="--marpit-advanced-background-split:50%;">
2024-09-29 18:18:05 +00:00
<h2 id="text-legibility">Text Legibility</h2>
<p>An important issue when using colored text and/or backgrounds is <strong>legibility</strong>.</p>
<p>Web Content Accessibility Guidelines require a 4.5 color contrast (3:1 for large text).</p>
<p>Minimize <em>saturation</em> in backgrounds, pick a font color with opposing <em>lightness</em>.</p>
<p><a href="https://webaim.org/resources/contrastchecker/">https://webaim.org/resources/contrastchecker/</a></p>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject><foreignObject width="1280" height="720" data-marpit-advanced-background="pseudo"><section lang="en-US" data-marpit-advanced-background="pseudo" data-marpit-advanced-background-split="left" style=""></section></foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="44" lang="en-US">
2024-09-28 21:17:56 +00:00
<h2 id="tools">Tools</h2>
2024-09-27 23:18:23 +00:00
<ul>
2024-09-28 21:17:56 +00:00
<li>Vega Schemes: <a href="https://vega.github.io/vega/docs/schemes/">https://vega.github.io/vega/docs/schemes/</a></li>
<li>Contrast/theme exploration: <a href="https://schubert-da.github.io/dataviz-palette-tool/">https://schubert-da.github.io/dataviz-palette-tool/</a></li>
<li>Theme exploration for cartography: <a href="https://colorbrewer2.org/">https://colorbrewer2.org/</a></li>
<li>Color-theory based theme creator: <a href="https://meodai.github.io/poline/">https://meodai.github.io/poline/</a></li>
<li>Theme creator w/ theme sharing: <a href="https://coolors.co">https://coolors.co</a></li>
2024-09-29 18:18:05 +00:00
<li>HSL/RGB picker: <a href="https://hslpicker.com/">https://hslpicker.com/</a></li>
<li>Contast checker: <a href="https://webaim.org/resources/contrastchecker/">https://webaim.org/resources/contrastchecker/</a></li>
2024-09-28 21:17:56 +00:00
</ul>
<h3 id="color-blindness">Color-Blindness</h3>
<ul>
<li>MacOS/iOS app: <a href="https://michelf.ca/projects/sim-daltonism/">https://michelf.ca/projects/sim-daltonism/</a></li>
<li>Browser extensions (search &quot;colorblindness&quot; in your browser of choice)</li>
2024-09-27 23:18:23 +00:00
</ul>
</section>
2024-10-11 17:38:17 +00:00
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1280 720"><foreignObject width="1280" height="720"><section id="45" lang="en-US">
2024-09-27 22:28:23 +00:00
<h2 id="acknowledgements--references">Acknowledgements &amp; References</h2>
<p>Thanks to Alex Hale, Andrew McNutt, and Jessica Hullman for sharing their materials.</p>
2024-09-28 21:17:56 +00:00
<p>Color space images are from <a href="https://jamie-wong.com/post/color/">https://jamie-wong.com/post/color/</a>, which is an incredible resource if you'd like to go deeper into both the biology and math of color.</p>
2024-09-27 22:28:23 +00:00
<ul>
<li><a href="https://www.math.csi.cuny.edu/~mvj/GC-DataViz-S23/lectures/L6.html">https://www.math.csi.cuny.edu/~mvj/GC-DataViz-S23/lectures/L6.html</a></li>
<li><a href="https://en.wikipedia.org/wiki/Stevens%27s_power_law">https://en.wikipedia.org/wiki/Stevens's_power_law</a></li>
2024-09-27 23:18:23 +00:00
<li><a href="https://colorusage.arc.nasa.gov">https://colorusage.arc.nasa.gov</a></li>
2024-09-29 18:18:05 +00:00
<li><a href="https://vega.github.io/vega/docs/schemes/">https://vega.github.io/vega/docs/schemes/</a></li>
2024-09-27 22:28:23 +00:00
</ul>
</section>
2024-11-13 23:50:35 +00:00
<script>!function(){"use strict";const t={h1:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"1"},style:"display: block; font-size: 2em; margin-block-start: 0.67em; margin-block-end: 0.67em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h2:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"2"},style:"display: block; font-size: 1.5em; margin-block-start: 0.83em; margin-block-end: 0.83em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h3:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"3"},style:"display: block; font-size: 1.17em; margin-block-start: 1em; margin-block-end: 1em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h4:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"4"},style:"display: block; margin-block-start: 1.33em; margin-block-end: 1.33em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h5:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"5"},style:"display: block; font-size: 0.83em; margin-block-start: 1.67em; margin-block-end: 1.67em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},h6:{proto:()=>HTMLHeadingElement,attrs:{role:"heading","aria-level":"6"},style:"display: block; font-size: 0.67em; margin-block-start: 2.33em; margin-block-end: 2.33em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;"},span:{proto:()=>HTMLSpanElement},pre:{proto:()=>HTMLElement,style:"display: block; font-family: monospace; white-space: pre; margin: 1em 0; --marp-auto-scaling-white-space: pre;"}},e="data-marp-auto-scaling-wrapper",i="data-marp-auto-scaling-svg",n="data-marp-auto-scaling-container";class s extends HTMLElement{container;containerSize;containerObserver;svg;svgComputedStyle;svgPreserveAspectRatio="xMinYMid meet";wrapper;wrapperSize;wrapperObserver;constructor(){super();const t=t=>([e])=>{const{width:i,height:n}=e.contentRect;this[t]={width:i,height:n},this.updateSVGRect()};this.attachShadow({mode:"open"}),this.containerObserver=new ResizeObserver(t("containerSize")),this.wrapperObserver=new ResizeObserver(((...e)=>{t("wrapperSize")(...e),this.flushSvgDisplay()}))}static get observedAttributes(){return["data-downscale-only"]}connectedCallback(){this.shadowRoot.innerHTML=`\n<style>\n svg[${i}] { display: block; width: 100%; height: auto; vertical-align: top; }\n span[${n}] { display: table; white-space: var(--marp-auto-scaling-white-space, nowrap); width: max-content; }\n</style>\n<div ${e}>\n <svg part="svg" ${i}>\n <foreignObject><span ${n}><slot></slot></span></foreignObject>\n </svg>\n</div>\n `.split(/\n\s*/).join(""),this.wrapper=this.shadowRoot.querySelector(`div[${e}]`)??void 0;const t=this.svg;this.svg=this.wrapper?.querySelector(`svg[${i}]`)??void 0,this.svg!==t&&(this.svgComputedStyle=this.svg?window.getComputedStyle(this.svg):void 0),this.container=this.svg?.querySelector(`span[${n}]`)??void 0,this.observe()}disconnectedCallback(){this.svg=void 0,this.svgComputedStyle=void 0,this.wrapper=void 0,this.container=void 0,this.observe()}attributeChangedCallback(){this.observe()}flushSvgDisplay(){const{svg:t}=this;t&&(t.style.display="inline",requestAnimationFrame((()=>{t.style.display=""})))}observe(){this.containerObserver.disconnect(),this.wrapperObserver.disconnect(),this.wrapper&&this.wrapperObserver.observe(this.wrapper),this.container&&this.containerObserver.observe(this.container),this.svgComputedStyle&&this.observeSVGStyle(this.svgComputedStyle)}observeSVGStyle(t){const e=()=>{const i=(()=>{const e=t.getPropertyValue("--preserve-aspect-ratio");if(e)return e.trim();return`x${(({textAlign:t,direction:e})=>{if(t.endsWith("left"))return"Min";if(t.endsWith("right"))return"Max";if("start"===t||"end"===t){let i="rtl"===e;return"end"===t&&(i=!i),i?"Max":"Min"}return"Mid"})(t)}YMid meet`})();i!==this.svgPreserveAspectRatio&&(this.svgPreserveAspectRatio=i,this.updateSVGRect()),t===this.svgComputedStyle&&requestAnimationFrame(e)};e()}updateSVGRect(){let t=Math.ceil(this.containerSize?.w
</script></foreignObject></svg></div><div class="bespoke-marp-note" data-index="0" tabindex="0"><p>photo CC-By https://flickr.com/photos/andreaskrispler/4651412740/</p></div><div class="bespoke-marp-note" data-index="17" tabindex="0"><p>credit: https://en.wikipedia.org/wiki/File:Linear_visible_spectrum.svg</p></div><div class="bespoke-marp-note" data-index="18" tabindex="0"><p>source https://commons.wikimedia.org/wiki/File:Cone-fundamentals-with-srgb-spectrum.svg</p></div><div class="bespoke-marp-note" data-index="22" tabindex="0"><p>Source: https://www.color-meanings.com/color-symbolism-different-cultures/</p><p>image from wikipedia: UK House of Commons</p></div><div class="bespoke-marp-note" data-index="26" tabindex="0"><p>https://commons.wikimedia.org/wiki/File:Rgb-compose-Alim_Khan.jpg</p></div><div class="bespoke-marp-note" data-index="32" tabindex="0"><p>image source: https://upload.wikimedia.org/wikipedia/commons/3/34/RGB_pixels.jpg</p></div><div class="bespoke-marp-note" data-index="38" tabindex="0"><p>source: Peter Aldhous, NICAR 2016</p></div><script>/*!! License: https://unpkg.com/@marp-team/marp-cli@4.0.3/lib/bespoke.js.LICENSE.txt */
!function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,n,r=(n||(n=1,t={from:function(e,t){var n,r=1===(e.parent||e).nodeType?e.parent||e:document.querySelector(e.parent||e),o=[].filter.call("string"==typeof e.slides?r.querySelectorAll(e.slides):e.slides||r.children,(function(e){return"SCRIPT"!==e.nodeName})),a={},i=function(e,t){return(t=t||{}).index=o.indexOf(e),t.slide=e,t},s=function(e,t){a[e]=(a[e]||[]).filter((function(e){return e!==t}))},c=function(e,t){return(a[e]||[]).reduce((function(e,n){return e&&!1!==n(t)}),!0)},l=function(e,t){o[e]&&(n&&c("deactivate",i(n,t)),n=o[e],c("activate",i(n,t)))},d=function(e,t){var r=o.indexOf(n)+e;c(e>0?"next":"prev",i(n,t))&&l(r,t)},u={off:s,on:function(e,t){return(a[e]||(a[e]=[])).push(t),s.bind(null,e,t)},fire:c,slide:function(e,t){if(!arguments.length)return o.indexOf(n);c("slide",i(o[e],t))&&l(e,t)},next:d.bind(null,1),prev:d.bind(null,-1),parent:r,slides:o,destroy:function(e){c("destroy",i(n,e)),a={}}};return(t||[]).forEach((function(e){e(u)})),n||l(0),u}}),t),o=e(r);const a=document.body,i=(...e)=>history.replaceState(...e),s="",c="presenter",l="next",d=["",c,l],u="bespoke-marp-",f=`data-${u}`,m=(e,{protocol:t,host:n,pathname:r,hash:o}=location)=>{const a=e.toString();return`${t}//${n}${r}${a?"?":""}${a}${o}`},g=()=>a.dataset.bespokeView,p=e=>new URLSearchParams(location.search).get(e),v=(e,t={})=>{const n={location,setter:i,...t},r=new URLSearchParams(n.location.search);for(const t of Object.keys(e)){const n=e[t];"string"==typeof n?r.set(t,n):r.delete(t)}try{n.setter({...window.history.state??{}},"",m(r,n.location))}catch(e){console.error(e)}},h=(()=>{const e="bespoke-marp";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch{return!1}})(),y=e=>{try{return localStorage.getItem(e)}catch{return null}},b=(e,t)=>{try{return localStorage.setItem(e,t),!0}catch{return!1}},w=e=>{try{return localStorage.removeItem(e),!0}catch{return!1}},x=(e,t)=>{const n="aria-hidden";t?e.setAttribute(n,"true"):e.removeAttribute(n)},k=e=>{e.parent.classList.add(`${u}parent`),e.slides.forEach((e=>e.classList.add(`${u}slide`))),e.on("activate",(t=>{const n=`${u}active`,r=t.slide,o=r.classList,a=!o.contains(n);if(e.slides.forEach((e=>{e.classList.remove(n),x(e,!0)})),o.add(n),x(r,!1),a){const e=`${n}-ready`;o.add(e),document.body.clientHeight,o.remove(e)}}))},$=e=>{let t=0,n=0;Object.defineProperty(e,"fragments",{enumerable:!0,value:e.slides.map((e=>[null,...e.querySelectorAll("[data-marpit-fragment]")]))});const r=r=>void 0!==e.fragments[t][n+r],o=(r,o)=>{t=r,n=o,e.fragments.forEach(((e,t)=>{e.forEach(((e,n)=>{if(null==e)return;const a=t<r||t===r&&n<=o;e.setAttribute(`${f}fragment`,(a?"":"in")+"active");const i=`${f}current-fragment`;t===r&&n===o?e.setAttribute(i,"current"):e.removeAttribute(i)}))})),e.fragmentIndex=o;const a={slide:e.slides[r],index:r,fragments:e.fragments[r],fragmentIndex:o};e.fire("fragment",a)};e.on("next",(({fragment:a=!0})=>{if(a){if(r(1))return o(t,n+1),!1;const a=t+1;e.fragments[a]&&o(a,0)}else{const r=e.fragments[t].length;if(n+1<r)return o(t,r-1),!1;const a=e.fragments[t+1];a&&o(t+1,a.length-1)}})),e.on("prev",(({fragment:a=!0})=>{if(r(-1)&&a)return o(t,n-1),!1;const i=t-1;e.fragments[i]&&o(i,e.fragments[i].length-1)})),e.on("slide",(({index:t,fragment:n})=>{let r=0;if(void 0!==n){const o=e.fragments[t];if(o){const{length:e}=o;r=-1===n?e-1:Math.min(Math.max(n,0),e-1)}}o(t,r)})),o(0,0)},E=document,L=()=>!(!E.fullscreenEnabled&&!E.webkitFullscreenEnabled),S=()=>!(!E.fullscreenElement&&!E.webkitFullscreenElement),P=e=>{e.fullscreen=()=>{L()&&(async()=>{S()?(E.exitFullscreen||E.webkitExitFullscreen)?.call(E):((e=E.body)=>{(e.requestFullscreen||e.webkitRequestFullscreen)?.call(e)})()})()},document.addEventListener("keydown",(t=>{"f"!==t.key&&"F11"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!L()||(e.fullscreen(),t.preventDefault())}))},_=`${u}inactive`,T=(e=2e3)=>({parent:t,fire:n})=>{const r=t.classList,o=e=>n(`marp-${e?"":"in"}active`);let a;const i=()=>{a&&clearTimeout(a),a=setTimeou