Skip to content

Instantly share code, notes, and snippets.

@cyjake
Forked from ricardobeat/favicon.txt
Created December 3, 2013 02:31
Show Gist options
  • Save cyjake/7762956 to your computer and use it in GitHub Desktop.
Save cyjake/7762956 to your computer and use it in GitHub Desktop.
# How to create a favicon with multiple image sizes and keep alpha transparency
- export your images in the desired sizes (16x16, 32x32 ... max 256x256) as PNGs + alpha
- install ImageMagick
Run this command (replacing the .png files for your own images):
convert favicon-16.png favicon-32.png favicon-64.png -colors 256 -alpha background favicon.ico
The `-alpha background` options is what maintains the alpha channel. You can reduce colors even more if you want, be careful about file size - a favicon with all sizes up to 256px will hit > 100kb.
@luckydrq
Copy link

luckydrq commented Dec 3, 2013

this great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment