<?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: Taylor zhu</title>
    <description>The latest articles on DEV Community by Taylor zhu (@wei_zhu_aa04d872270a4135c).</description>
    <link>https://dev.to/wei_zhu_aa04d872270a4135c</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%2F3468943%2F9b7ec750-f147-4416-aa3c-c9ab62d867e5.png</url>
      <title>DEV Community: Taylor zhu</title>
      <link>https://dev.to/wei_zhu_aa04d872270a4135c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wei_zhu_aa04d872270a4135c"/>
    <language>en</language>
    <item>
      <title>I Built a Free Tool to Turn Photos into Perler Bead Patterns</title>
      <dc:creator>Taylor zhu</dc:creator>
      <pubDate>Tue, 01 Sep 2026 16:56:34 +0000</pubDate>
      <link>https://dev.to/wei_zhu_aa04d872270a4135c/i-built-a-free-tool-to-turn-photos-into-perler-bead-patterns-3h0f</link>
      <guid>https://dev.to/wei_zhu_aa04d872270a4135c/i-built-a-free-tool-to-turn-photos-into-perler-bead-patterns-3h0f</guid>
      <description>&lt;p&gt;Turning a photo into a usable Perler bead pattern sounds simple: resize the image, match every pixel to a bead color, and draw a grid.&lt;/p&gt;

&lt;p&gt;However, while building the tool, I found that generating a practical pattern involves more than just pixelating an image.&lt;/p&gt;

&lt;p&gt;I needed to solve several problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How can image colors be matched to real bead colors?&lt;/li&gt;
&lt;li&gt;How can users control the size and complexity of the pattern?&lt;/li&gt;
&lt;li&gt;How can the tool calculate the number of beads required?&lt;/li&gt;
&lt;li&gt;How can the final pattern be exported for printing?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is &lt;a href="https://perlerbeads.net" rel="noopener noreferrer"&gt;PerlerBeads.net&lt;/a&gt;, a free browser-based tool that converts photos and illustrations into printable Perler bead patterns.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Image-Processing Pipeline
&lt;/h2&gt;

&lt;p&gt;The converter follows these main steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Load the uploaded image in the browser.&lt;/li&gt;
&lt;li&gt;Resize large images before processing.&lt;/li&gt;
&lt;li&gt;Sample pixels according to the selected grid size.&lt;/li&gt;
&lt;li&gt;Match every sampled color to an available bead color.&lt;/li&gt;
&lt;li&gt;Generate the bead grid and count the required colors.&lt;/li&gt;
&lt;li&gt;Export the result as PNG or PDF.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The image processing runs directly in the browser using the Canvas API. This provides fast feedback and avoids sending the uploaded image to a separate image-processing server.&lt;/p&gt;




&lt;h2&gt;
  
  
  Matching Image Colors to Bead Colors
&lt;/h2&gt;

&lt;p&gt;A simple color matcher might compare the numerical distance between two RGB colors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;rgbDistance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;first&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="nx"&gt;second&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;first&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;second&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;first&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;second&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;first&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;second&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This method is fast, but the closest RGB value is not always the color that looks closest to the human eye.&lt;/p&gt;

&lt;p&gt;For better results, the converter uses perceptual color matching. Colors are converted into the LAB color space and compared using the CIEDE2000 color-difference formula.&lt;/p&gt;

&lt;p&gt;In simple terms, the algorithm asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which available bead color looks most similar to this image color?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The simplified matching logic looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;findClosestBeadColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;pixelLab&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="nx"&gt;palette&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;BeadColor&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;closestColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;palette&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;smallestDifference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;Infinity&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;palette&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;difference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;deltaE2000&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pixelLab&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lab&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;difference&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;smallestDifference&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;smallestDifference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;difference&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;closestColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;closestColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This produces more natural results for skin tones, shadows, muted colors, and colors with similar brightness.&lt;/p&gt;




&lt;h2&gt;
  
  
  Controlling the Color Palette
&lt;/h2&gt;

&lt;p&gt;A mathematically accurate color match is not always the most practical choice.&lt;/p&gt;

&lt;p&gt;Some bead colors may be difficult to purchase. A generated pattern may also contain several colors that look almost identical.&lt;/p&gt;

&lt;p&gt;The tool therefore allows users to limit the available palette and exclude individual colors before generating the final pattern.&lt;/p&gt;

&lt;p&gt;A pattern using 18 carefully selected colors is often easier to build than a pattern using 40 slightly different colors.&lt;/p&gt;




&lt;h2&gt;
  
  
  Choosing the Grid Size
&lt;/h2&gt;

&lt;p&gt;Grid size has a major effect on the final result.&lt;/p&gt;

&lt;p&gt;A smaller grid:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses fewer beads&lt;/li&gt;
&lt;li&gt;Is faster to assemble&lt;/li&gt;
&lt;li&gt;Removes fine details&lt;/li&gt;
&lt;li&gt;Works well for icons and simple characters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A larger grid:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Preserves more details&lt;/li&gt;
&lt;li&gt;Produces smoother shapes&lt;/li&gt;
&lt;li&gt;Requires more beads and boards&lt;/li&gt;
&lt;li&gt;Takes longer to assemble&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each cell in the generated grid represents one real bead. This makes it possible to estimate the physical size and material requirements before starting the project.&lt;/p&gt;




&lt;h2&gt;
  
  
  Generating a Material List
&lt;/h2&gt;

&lt;p&gt;Once every grid cell has a color ID, the converter can count how many beads of each color are required.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;beadCounts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cell&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cells&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;cell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;colorId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nx"&gt;beadCounts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;cell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;colorId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;beadCounts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;colorId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generated material list can include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bead color name&lt;/li&gt;
&lt;li&gt;Color code&lt;/li&gt;
&lt;li&gt;Required quantity&lt;/li&gt;
&lt;li&gt;Total number of beads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This connects the digital pattern with the real crafting process. Users can check which colors they need before assembling the pattern.&lt;/p&gt;




&lt;h2&gt;
  
  
  Exporting the Pattern
&lt;/h2&gt;

&lt;p&gt;A useful export needs more than a screenshot of the preview.&lt;/p&gt;

&lt;p&gt;The exported pattern can include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A clearly separated bead grid&lt;/li&gt;
&lt;li&gt;Pattern dimensions&lt;/li&gt;
&lt;li&gt;Color labels&lt;/li&gt;
&lt;li&gt;Total bead count&lt;/li&gt;
&lt;li&gt;Quantity for each bead color&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PNG is convenient for saving and sharing, while PDF is usually better for printing and assembling larger patterns.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try the Tool
&lt;/h2&gt;

&lt;p&gt;You can try the finished converter here:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://perlerbeads.net/photo-to-perler-bead-pattern" rel="noopener noreferrer"&gt;Try the Free Perler Bead Pattern Generator&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It runs directly in the browser and supports adjustable grid sizes, palette controls, bead quantity statistics, and printable exports.&lt;/p&gt;

&lt;p&gt;I’m continuing to improve the conversion quality and editing experience. If you are interested in image processing, pixel art, color matching, or creative coding, I’d love to hear your feedback.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>nextjs</category>
      <category>javascript</category>
    </item>
    <item>
      <title>The Story of a Simple Fix: Using AI to Say Goodbye to Boring Coloring Pages</title>
      <dc:creator>Taylor zhu</dc:creator>
      <pubDate>Sat, 30 Aug 2025 07:16:24 +0000</pubDate>
      <link>https://dev.to/wei_zhu_aa04d872270a4135c/the-story-of-a-simple-fix-using-ai-to-say-goodbye-to-boring-coloring-pages-26o9</link>
      <guid>https://dev.to/wei_zhu_aa04d872270a4135c/the-story-of-a-simple-fix-using-ai-to-say-goodbye-to-boring-coloring-pages-26o9</guid>
      <description>&lt;p&gt;When I first started thinking about ColoringStore, I noticed a simple problem: most coloring pages out there are pretty generic. Whether you're a parent looking for something for your kids or an adult trying to unwind, it's tough to find a design that truly matches a specific idea or feeling you have. This made the whole experience of coloring, which should be fun and creative, feel kind of limited.&lt;br&gt;
To fix this, I thought: what if we could use AI to turn any idea into a coloring page? That's why I built ColoringStore. My goal was to make creating a custom coloring page as easy as typing a sentence or uploading a photo. No drawing skills needed, no endless searching—just an idea and a few seconds.&lt;br&gt;
ColoringStore solves three key problems:&lt;br&gt;
a. It banishes boredom: Your coloring page isn't just one of many; it's a unique creation based on your personal vision.&lt;br&gt;
b. It makes everyone an artist: You don't need any special skills to create beautiful, ready-to-color designs.&lt;br&gt;
c. It saves time: What used to take hours of searching or drawing now happens in seconds, letting you get straight to the fun part.&lt;/p&gt;

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