<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Code Lead Grow</title>
    <description>The latest articles on DEV Community by Code Lead Grow (@codeleadgrow).</description>
    <link>https://dev.to/codeleadgrow</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4100951%2Fd7a87567-a7ba-4568-aae0-229b0f4e59ea.png</url>
      <title>DEV Community: Code Lead Grow</title>
      <link>https://dev.to/codeleadgrow</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codeleadgrow"/>
    <language>en</language>
    <item>
      <title>My light-switch mascot: 4 images, mix-blend-mode and a few lines of JS</title>
      <dc:creator>Code Lead Grow</dc:creator>
      <pubDate>Fri, 30 Oct 2026 06:46:36 +0000</pubDate>
      <link>https://dev.to/codeleadgrow/my-light-switch-mascot-4-images-mix-blend-mode-and-a-few-lines-of-js-4min</link>
      <guid>https://dev.to/codeleadgrow/my-light-switch-mascot-4-images-mix-blend-mode-and-a-few-lines-of-js-4min</guid>
      <description>&lt;p&gt;I love front-end work, but life took me elsewhere: years of coding whatever came along, and I never got deep into it. Now, with AI, I can finally learn while I build.&lt;/p&gt;

&lt;p&gt;A while ago I saw a mascot with three light switches around it. Click one and its lamp turns on or off, and the light falls on the character. I loved it, so I asked AI to research it and make one like it.&lt;/p&gt;

&lt;p&gt;It was done fast, and then I realised I had no idea how it worked. So I sat down and took it apart. I expected three.js or something complicated. It turned out all it takes is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4 images&lt;/strong&gt;: one with every lamp off, and three with one lamp on each. Stack them and let CSS blend them; with 2 or 3 lamps on at once, the colours still mix well.&lt;/li&gt;
&lt;li&gt;The main CSS property doing the blending is &lt;code&gt;mix-blend-mode&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The images themselves: ask Gemini or ChatGPT to draw them.&lt;/li&gt;
&lt;li&gt;For the click when a lamp switches, AI wrote a few lines of JS so the browser makes the sound itself. No mp3 file at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I put the whole process into a talk. Here's a short video that pulls out the principles underneath:&lt;/p&gt;


&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/DxBUq1NsAfE" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;If you want to dig deeper, open the slides and turn on autopilot, and they present themselves: &lt;a href="https://vibe-coding-a-light-switch-mascot.codeleadgrow.workers.dev/?src=devto" rel="noopener noreferrer"&gt;https://vibe-coding-a-light-switch-mascot.codeleadgrow.workers.dev/?src=devto&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Slide 9 keeps exactly how I prompted, and re-prompted, until it came out right. Honestly, that part was painful. I'm still looking for a better way. Ha ha.&lt;/p&gt;

&lt;p&gt;Want more, or the next parts as they come out? Follow me on Facebook: &lt;a href="https://www.facebook.com/codeleadgrow" rel="noopener noreferrer"&gt;https://www.facebook.com/codeleadgrow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Building in public 2026 · part 1: Vibe-Coding a Light-switch Mascot&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I wrote this post in Vietnamese; AI helped me translate it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
