<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>transparent on
A Scripter's Notes</title><link>https://scripter.co/tags/transparent/</link><description>Recent content in transparent
on A Scripter's Notes</description><language>en-us</language><managingEditor>kaushal.modi@gmail.com (Kaushal Modi)</managingEditor><webMaster>kaushal.modi@gmail.com (Kaushal Modi)</webMaster><lastBuildDate>Wed, 22 Apr 2026 08:24:58 -0400</lastBuildDate><generator>Hugo -- gohugo.io</generator><docs>https://validator.w3.org/feed/docs/rss2.html</docs><atom:link href="https://scripter.co/tags/transparent/index.xml" rel="self" type="application/rss+xml"/><item><title>Generating a transparent favicon</title><link>https://scripter.co/generating-a-transparent-favicon/</link><description>&lt;p>While generating a simple favicon for this blog, I went through a little exercise on how to generate a favicon with transparent background. I did not want the favicon with square block background which runs a risk of not blending well with the browser tab background as seen below:&lt;/p>
&lt;p>&lt;img src="https://scripter.co/images/favicon_not_good.png" alt="Bad Favicon">&lt;/p>
&lt;h2 id="inkscape-and-transparent-png">Inkscape and transparent png&amp;nbsp;&lt;a class="headline-hash no-text-decoration" href="#inkscape-and-transparent-png">#&lt;/a>&lt;/h2>
&lt;p>Here are the steps I took to make this icon transparent. I used &lt;a href="https://inkscape.org/en/">Inkscape&lt;/a> and &lt;a href="http://tools.dynamicdrive.com/favicon/">Dynamic Drive&amp;rsquo;s online favicon generator&lt;/a> to make this happen.&lt;/p>
&lt;ol>
&lt;li>Inkscape sets the background of the image to be transparent by default. But here is how to verify that that&amp;rsquo;s the case. Do &lt;kbd>Ctrl&lt;/kbd> + &lt;kbd>Shift&lt;/kbd> + &lt;kbd>d&lt;/kbd> or &lt;em>Files &amp;gt; Document Properties&lt;/em>, click on the &lt;em>Background color&lt;/em> and ensure that the &lt;em>Alpha&lt;/em> component of &lt;em>RGBA Hex&lt;/em> is &lt;code>00&lt;/code>.
&lt;img src="https://scripter.co/images/favicon_transparent_background.png" alt="Inkscape - Transparent Background">&lt;/li>
&lt;li>This next step when saving the image is crucial. Do not simply &lt;em>Save&lt;/em> or &lt;em>Save As&lt;/em> the image. That will &lt;em>not&lt;/em> save the transparent properties in the image!&lt;/li>
&lt;/ol>
&lt;p>Thanks to &lt;a href="https://graphicdesign.stackexchange.com/a/44411/78149">this &lt;em>graphicdesign.stackexchange&lt;/em> solution&lt;/a>,&lt;/p>
&lt;blockquote>
&lt;p>Just using &lt;em>save as -&amp;gt; png&lt;/em> does not apply the transparent background. However, the transparent background is the default when you export: &lt;em>File &amp;gt; Export Bitmap -&amp;gt; Export&lt;/em>.&lt;/p>
&lt;/blockquote>
&lt;p>In newer Inkscape versions (at least in version 0.91), that option is &lt;em>File &amp;gt; Export PNG Image&lt;/em> (or &lt;kbd>Ctrl&lt;/kbd> + &lt;kbd>Shift&lt;/kbd> + &lt;kbd>e&lt;/kbd>) instead. Note that when you do that, instead of a pop-up window, you will see an attached window (shown below) appear on the side.&lt;/p>
&lt;p>&lt;img src="https://scripter.co/images/favicon_export_png_image.png" alt="Inkscape - Export PNG Image">&lt;/p>
&lt;h2 id="png-or-ico">&lt;code>.png&lt;/code> or &lt;code>.ico&lt;/code>&amp;nbsp;&lt;a class="headline-hash no-text-decoration" href="#png-or-ico">#&lt;/a>&lt;/h2>
&lt;p>Another question I faced when working on this was whether I should save the favicon as a &lt;code>.png&lt;/code> or .&lt;code>ico&lt;/code> because I have seen both of these types being used.&lt;/p>
&lt;p>Thanks to &lt;a href="https://stackoverflow.com/a/1344379/1219634">this &lt;em>stackoverflow&lt;/em> solution&lt;/a>,&lt;/p>
&lt;blockquote>
&lt;p>All modern browsers (tested with Chrome 4, Firefox 3.5, IE8, Opera 10 and Safari 4) will always request a favicon.ico unless you&amp;rsquo;ve specified a shortcut icon via &amp;lt;link&amp;gt;.&lt;/p>
&lt;/blockquote>
&lt;p>The answer also says that &lt;code>.ico&lt;/code> files support transparency just fine
and that&amp;rsquo;s where I learned about Dynamic Drive&amp;rsquo;s favicon generator tool.&lt;/p>
&lt;h2 id="summary">Summary&amp;nbsp;&lt;a class="headline-hash no-text-decoration" href="#summary">#&lt;/a>&lt;/h2>
&lt;ul>
&lt;li>Created a transparent &lt;code>.png&lt;/code> in Inkscape.&lt;/li>
&lt;li>Converted it to &lt;code>.ico&lt;/code> using Dynamic Drive&amp;rsquo;s favicon generator tool.&lt;/li>
&lt;li>And the result!
&lt;img src="https://scripter.co/images/favicon_good.png" alt="Good Favicon">&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="update---oct-20-2016">Update - Oct 20 2016&amp;nbsp;&lt;a class="headline-hash no-text-decoration" href="#update---oct-20-2016">#&lt;/a>&lt;/h2>
&lt;p>Today I was browsing this site on my Android phone and I noticed that the Google Chrome browser did not show this favicon on the list of recently visited websites.&lt;/p>
&lt;p>That bugged me and a little bit of googling led me to an even better online favicon generator website: &lt;a href="https://realfavicongenerator.net/">realfavicongenerator.net&lt;/a>.&lt;/p>
&lt;p>I simply needed to upload my Inkscape created &lt;code>.png&lt;/code> (with transparent background) to that site, and it provided a favicon package for different platforms and an HTML code to be put in the &lt;code>&amp;lt;head&amp;gt;&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-html" data-lang="html">&lt;span class="line">&lt;span class="cl">&lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">link&lt;/span> &lt;span class="na">rel&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;apple-touch-icon&amp;#34;&lt;/span> &lt;span class="na">sizes&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;180x180&amp;#34;&lt;/span> &lt;span class="na">href&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;/apple-touch-icon.png&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">link&lt;/span> &lt;span class="na">rel&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;icon&amp;#34;&lt;/span> &lt;span class="na">type&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;image/png&amp;#34;&lt;/span> &lt;span class="na">href&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;/favicon-32x32.png&amp;#34;&lt;/span> &lt;span class="na">sizes&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;32x32&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">link&lt;/span> &lt;span class="na">rel&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;icon&amp;#34;&lt;/span> &lt;span class="na">type&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;image/png&amp;#34;&lt;/span> &lt;span class="na">href&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;/favicon-16x16.png&amp;#34;&lt;/span> &lt;span class="na">sizes&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;16x16&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">link&lt;/span> &lt;span class="na">rel&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;manifest&amp;#34;&lt;/span> &lt;span class="na">href&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;/manifest.json&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">link&lt;/span> &lt;span class="na">rel&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;mask-icon&amp;#34;&lt;/span> &lt;span class="na">href&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;/safari-pinned-tab.svg&amp;#34;&lt;/span> &lt;span class="na">color&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;#5bbad5&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">&amp;lt;&lt;/span>&lt;span class="nt">meta&lt;/span> &lt;span class="na">name&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;theme-color&amp;#34;&lt;/span> &lt;span class="na">content&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">&amp;#34;#000000&amp;#34;&lt;/span>&lt;span class="p">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The website also shows previews of how the icon would look on different platforms: regular browser tabs, iOS, Android, etc.&lt;/p>
&lt;p>Here is how this favicon looks on Android Chrome after updating the icons and this website&amp;rsquo;s &lt;code>&amp;lt;head&amp;gt;&lt;/code>.&lt;/p>
&lt;p>&lt;img src="https://scripter.co/images/favicon_android_chrome.png" alt="Favicon in Android Chrome">&lt;/p></description><category domain="https://scripter.co/categories/web-design">Web Design</category><category domain="https://scripter.co/tags/favicon">favicon</category><category domain="https://scripter.co/tags/transparent">transparent</category><category domain="https://scripter.co/tags/browser">browser</category><guid>https://scripter.co/generating-a-transparent-favicon/</guid><pubDate>Sat, 15 Oct 2016 01:27:35 -0400</pubDate></item></channel></rss>