Skip to content

Commit 5728b50

Browse files
Update color.html
I don't know why it took me so long to do this.
1 parent d30ae3a commit 5728b50

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

colors/color.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ <h3 class="subheading" id="subtract">Subtraction</h3>
100100
<p>Since subtraction is not commutative, the order you put the values in is important. For example, if you subtract the second color from the first color, you get this:</p>
101101
<img src="images/SubSquare2.png" class="page-image" alt="Difference of two colors">
102102
<h3 class="subheading" id="difference">Difference</h3>
103-
<p>Subtraction works in a similar way, but with a few key differences</p>
103+
<p>Difference is essentially identical to subtraction, but instead of letting negative values be truncated, you use their absolute value, so you get the differences between the color values.</p>
104104
<div class="code-container"><pre><code class="language-javascript">c[0] = Math.abs(b[0] - a[0]);
105105
c[1] = Math.abs(b[1] - a[1]);
106106
c[2] = Math.abs(b[2] - a[2]);</code></pre></div>
@@ -300,4 +300,4 @@ <h3 class="subheading" id="bright">Changing Brightness</h3>
300300
<img src="images/HSVFixedBrightFroggies.png" class="page-image">
301301
<p>Most of what you saw here can be done with much less effort via the canvas context's <a href="https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/filter" target="_blank">filter</a> property, but where's the fun in that?</p>
302302
</body>
303-
</html>
303+
</html>

0 commit comments

Comments
 (0)