<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Tech Cafe - Duckquill</title>
    <subtitle>Dev adventures, epic bugs, tiny wins, and the occasional meltdown.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://golden-fox.dev/tags/duckquill/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://golden-fox.dev"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-08-09T00:00:00+00:00</updated>
    <id>https://golden-fox.dev/tags/duckquill/atom.xml</id>
    <entry xml:lang="en">
        <title>A theme can build its whole palette from one colour</title>
        <published>2026-08-09T00:00:00+00:00</published>
        <updated>2026-08-09T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Aakriti Agarwal
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://golden-fox.dev/til/accent-color-tinting/"/>
        <id>https://golden-fox.dev/til/accent-color-tinting/</id>
        
        <content type="html" xml:base="https://golden-fox.dev/til/accent-color-tinting/">&lt;p&gt;I was picking a theme today and went digging through Duckquill’s Sass, expecting to find
a big list of hardcoded colours. Instead I found this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#657B83, #839496); background-color: light-dark(#FDF6E3, #002B36);&quot;&gt;&lt;code data-lang=&quot;scss&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#93A1A1, #586E75);font-style: italic;&quot;&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#93A1A1, #586E75);font-style: italic;&quot;&gt; light mode&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--bg-color&lt;&#x2F;span&gt;&lt;span&gt;: color-mix(in srgb, var(&lt;&#x2F;span&gt;&lt;span&gt;--accent-color&lt;&#x2F;span&gt;&lt;span&gt;) 20%, white)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#93A1A1, #586E75);font-style: italic;&quot;&gt;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#93A1A1, #586E75);font-style: italic;&quot;&gt; dark mode&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;--bg-color&lt;&#x2F;span&gt;&lt;span&gt;: color-mix(in srgb, var(&lt;&#x2F;span&gt;&lt;span&gt;--accent-color&lt;&#x2F;span&gt;&lt;span&gt;) 10%, black)&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The background isn’t a colour you set. It’s your accent colour &lt;em&gt;mixed into&lt;&#x2F;em&gt; white or
black with plain CSS. So setting one hex value in the config:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#657B83, #839496); background-color: light-dark(#FDF6E3, #002B36);&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#268BD2, #268BD2);&quot;&gt;accent_color&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;#e8a0bf&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;gives me a soft pink-tinted off-white background for free, with no second variable and no
fiddling to make them match.&lt;&#x2F;p&gt;
&lt;p&gt;That’s the trick behind why so many cozy-looking sites use a cream background instead of
&lt;code&gt;#ffffff&lt;&#x2F;code&gt;. Pure white feels clinical. A warm off-white feels like paper. And &lt;code&gt;color-mix()&lt;&#x2F;code&gt;
means you get it automatically without ever picking the cream by hand.&lt;&#x2F;p&gt;
&lt;p&gt;The other neat bit: the text colour is computed in &lt;code&gt;oklch&lt;&#x2F;code&gt; from the same accent, so
contrast stays readable no matter what hue I pick. I can’t easily choose a colour that
breaks the site.&lt;&#x2F;p&gt;
&lt;p&gt;Small thing, but it reframed how I think about theming. One input, whole palette.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
