Convert SVG files into production-ready icon sets for Windows and macOS
Project description
svg-icon-gen
Convert a single SVG into a complete icon set โ ICO, ICNS, macOS menu bar templates, and PNG exports โ in one command.
svg-icon-gen logo.svg
๐ง Installation
pip install svg-icon-gen
Note:
svg-icon-gendepends on Cairo viacairosvg. If the install fails, install Cairo first:
Platform Command macOS brew install cairoUbuntu / Debian sudo apt install libcairo2Windows Install GTK for Windows
โฌ๏ธ Output
Running svg-icon-gen logo.svg produces:
logo/
โโโ logo.ico # Windows icon (16โ256px, multi-res)
โโโ logo_dark.ico # Inverted variant
โโโ logo.icns # macOS app icon (16โ1024px)
โโโ logo_mac_template.png # Menu bar icon, black 1x
โโโ logo_mac_template@2x.png # Menu bar icon, black 2x
โโโ logo_mac_template_dark.png # Menu bar icon, white 1x
โโโ logo_mac_template_dark@2x.png # Menu bar icon, white 2x
โโโ png/
โโโ light/
โ โโโ logo_16x16.png
โ โโโ logo_32x32.png
โ โโโ ...
โโโ dark/
โโโ ...
โ๏ธ Usage
# Single file
svg-icon-gen logo.svg
# Multiple files
svg-icon-gen icon1.svg icon2.svg icon3.svg
# Glob
svg-icon-gen assets/*.svg
# Watch mode โ regenerate on save
svg-icon-gen logo.svg --watch
# Custom output directory
svg-icon-gen logo.svg --out-dir ./dist/icons
# Custom PNG sizes
svg-icon-gen logo.svg --png-sizes 16,32,128,512
๐ฉ Flags
| Flag | Description |
|---|---|
--watch |
Watch for changes and regenerate automatically |
--ico-only |
Generate ICO only |
--icns-only |
Generate ICNS only |
--mac-only |
Generate macOS Template PNGs only |
--png-only |
Generate PNGs only |
--no-dark |
Skip dark/inverted variants |
--png-sizes SIZES |
Comma-separated sizes (default: 16,32,64,128,256,512) |
--out-dir DIR |
Output directory root (default: same folder as SVG) |
Platform Notes
๐ช Windows โ ICO
Standard multi-resolution .ico containing 16, 32, 48, 64, 128, and 256px layers.
๐ป macOS โ ICNS
Full Apple-spec .icns for app icons, containing all required sizes from 16px to 1024px. Uses icnsutil (pure Python, cross-platform). On macOS without icnsutil, falls back to the native iconutil CLI.
๐ macOS โ Menu Bar Template Icons
*Template.png files follow Apple's naming convention โ the system automatically inverts them for light/dark menu bars. The _dark white variant is provided for frameworks that require an explicit white icon (Electron, Tauri, SwiftUI NSStatusItem).
| File | Use case |
|---|---|
*Template.png / *Template@2x.png |
Native macOS apps, system auto-adapts |
*Template_dark.png / *Template_dark@2x.png |
Electron / Tauri explicit dark mode |
๐ญ Watch Mode
Install watchdog for instant file-system event detection. Without it, --watch falls back to polling every second.
pip install watchdog
Star History
๐ License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file svg_icon_gen-0.3.2.tar.gz.
File metadata
- Download URL: svg_icon_gen-0.3.2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b48e1d9e13cacd9554f88b1beaadcdf718f77d6a62fe7801f58a0459306134e3
|
|
| MD5 |
f60eb09da798f458c55ef19730388660
|
|
| BLAKE2b-256 |
cee3780e563d45a2273fa9205cc948f76d91b4eab1861d371c2ca8cf42ae51ed
|
Provenance
The following attestation bundles were made for svg_icon_gen-0.3.2.tar.gz:
Publisher:
publish.yml on Kookiejarz/svg-icon-gen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
svg_icon_gen-0.3.2.tar.gz -
Subject digest:
b48e1d9e13cacd9554f88b1beaadcdf718f77d6a62fe7801f58a0459306134e3 - Sigstore transparency entry: 1178735611
- Sigstore integration time:
-
Permalink:
Kookiejarz/svg-icon-gen@5f61676a7ba992684c98b313079c5c75f0483c04 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Kookiejarz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5f61676a7ba992684c98b313079c5c75f0483c04 -
Trigger Event:
push
-
Statement type:
File details
Details for the file svg_icon_gen-0.3.2-py3-none-any.whl.
File metadata
- Download URL: svg_icon_gen-0.3.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41bf1baeeb4db7c002f8c726c49ac7ebff555b65aabfe1a700cc9ddf6791b0e2
|
|
| MD5 |
c42fa0ba61c992e6966e0449c7d82a01
|
|
| BLAKE2b-256 |
b7f4b8fc57ad8fc3494981037c50ce8ff667edfaa839135ad4bb2db8299e330e
|
Provenance
The following attestation bundles were made for svg_icon_gen-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on Kookiejarz/svg-icon-gen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
svg_icon_gen-0.3.2-py3-none-any.whl -
Subject digest:
41bf1baeeb4db7c002f8c726c49ac7ebff555b65aabfe1a700cc9ddf6791b0e2 - Sigstore transparency entry: 1178735647
- Sigstore integration time:
-
Permalink:
Kookiejarz/svg-icon-gen@5f61676a7ba992684c98b313079c5c75f0483c04 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Kookiejarz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5f61676a7ba992684c98b313079c5c75f0483c04 -
Trigger Event:
push
-
Statement type: