snipt

Ctrl+h for KB shortcuts

Sass

Generating a Color Palette

1
2
3
4
5
    $base: #633;
    $compliment1: adjust-hue($base, 180);
    $compliment2: darken(adjust-hue($base, 180), 5%);
    $lighten1: lighten($base, 15%);
    $lighten2: lighten($base, 30%);
https://snipt.net/embed/e86827c0f7015eadde9024973375dc61/
/raw/e86827c0f7015eadde9024973375dc61/
e86827c0f7015eadde9024973375dc61
sass
Sass
5
2019-08-18T18:26:15
True
False
False
Jun 01, 2013 at 01:04 PM
/api/public/snipt/62846/
generating-a-color-palette
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a> <span class="nv">$base</span><span class="o">:</span> <span class="mh">#633</span><span class="err">;</span> </span><span id="L-2"><a name="L-2"></a> <span class="nv">$compliment1</span><span class="o">:</span> <span class="nf">adjust-hue</span><span class="p">(</span><span class="nv">$base</span><span class="o">,</span> <span class="mi">180</span><span class="p">)</span><span class="err">;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nv">$compliment2</span><span class="o">:</span> <span class="nf">darken</span><span class="p">(</span><span class="nf">adjust-hue</span><span class="p">(</span><span class="nv">$base</span><span class="o">,</span> <span class="mi">180</span><span class="p">)</span><span class="o">,</span> <span class="mi">5</span><span class="kt">%</span><span class="p">)</span><span class="err">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="nv">$lighten1</span><span class="o">:</span> <span class="nf">lighten</span><span class="p">(</span><span class="nv">$base</span><span class="o">,</span> <span class="mi">15</span><span class="kt">%</span><span class="p">)</span><span class="err">;</span> </span><span id="L-5"><a name="L-5"></a> <span class="nv">$lighten2</span><span class="o">:</span> <span class="nf">lighten</span><span class="p">(</span><span class="nv">$base</span><span class="o">,</span> <span class="mi">30</span><span class="kt">%</span><span class="p">)</span><span class="err">;</span> </span></pre></div> </td></tr></table>
SASS