<?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: melvin Joseph</title>
    <description>The latest articles on DEV Community by melvin Joseph (@melvin_joseph).</description>
    <link>https://dev.to/melvin_joseph</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1781091%2Fe744f5d0-d37d-44ba-87c7-d693cef005d7.png</url>
      <title>DEV Community: melvin Joseph</title>
      <link>https://dev.to/melvin_joseph</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/melvin_joseph"/>
    <language>en</language>
    <item>
      <title>I built ColorSnap: Instantly extract Tailwind CSS color palettes from any image</title>
      <dc:creator>melvin Joseph</dc:creator>
      <pubDate>Wed, 21 May 2025 16:35:33 +0000</pubDate>
      <link>https://dev.to/melvin_joseph/i-built-colorsnap-instantly-extract-tailwind-css-color-palettes-from-any-image-3ihk</link>
      <guid>https://dev.to/melvin_joseph/i-built-colorsnap-instantly-extract-tailwind-css-color-palettes-from-any-image-3ihk</guid>
      <description>&lt;p&gt;`I was working on a landing page late one night, trying to match a hero-section gradient to a screenshot my designer sent over.&lt;br&gt;&lt;br&gt;
The workflow was clunky:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq94hhc48v72kdjptlx0v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq94hhc48v72kdjptlx0v.jpg" alt="Image description" width="800" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Screenshot → Figma → Eyedropper the dominant colors
&lt;/li&gt;
&lt;li&gt;Copy hex codes into Tailwind’s docs to find the “closest” utility class by eye
&lt;/li&gt;
&lt;li&gt;Tweak, refresh, repeat … way too many times&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After the third project in a row where I did that dance, I figured there had to be a faster way.&lt;br&gt;&lt;br&gt;
So I opened a new repo and started tinkering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ColorSnap&lt;/strong&gt; began as thirty lines of JavaScript and an &lt;code&gt;input type="file"&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
I wired up &lt;code&gt;color-thief-browser&lt;/code&gt; to grab the top five colors from any image, converted them to LAB, and ran a ΔE distance check against every color in the Tailwind palette. When the script printed &lt;code&gt;bg-indigo-500&lt;/code&gt; for a random screenshot and it &lt;em&gt;looked right&lt;/em&gt; in the browser, I knew I was onto something.&lt;/p&gt;

&lt;p&gt;From there it snowballed:  &lt;a href="https://color-snap-five.vercel.app/" rel="noopener noreferrer"&gt;you can check it out here&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a small Next.js front end so I could drop the whole thing on Vercel
&lt;/li&gt;
&lt;li&gt;Tailwind for the UI (because, obviously)
&lt;/li&gt;
&lt;li&gt;a sleek gradient hero so the tool could market itself the moment you land on the page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now I can drag a product photo or a meme into the browser and—boom—get a mini style guide:&lt;/p&gt;

&lt;p&gt;`&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascrip</category>
      <category>tailwindcss</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
