Xylocopadream.IconTool 0.1.0

Prefix Reserved
dotnet tool install --global Xylocopadream.IconTool --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Xylocopadream.IconTool --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Xylocopadream.IconTool&version=0.1.0
                    
nuke :add-package Xylocopadream.IconTool --version 0.1.0
                    

Xylocopadream.IconTool

xd-icon makes the icons of an app from one drawing (svg or png):

Output For
<name>.ico Windows: 16, 20, 24, 32, 40, 48, 64, 128 and 256 px
<name>.icns macOS: 16 to 1024 px, at 1x and 2x
<name>-<size>.png Linux (.desktop files), documentation, stores
appicon.svg + appiconfg.svg a .NET MAUI MauiIcon (background color + icon)

Install

dotnet tool install -g Xylocopadream.IconTool

Use

xd-icon app.svg                          # app.ico, app.icns, app-256.png, app-512.png next to app.svg
xd-icon app.svg -o build/icons --ico     # only the .ico, in build/icons
xd-icon app.svg --png 48,128,256         # only these png
xd-icon app.svg --maui "#1B1E25"         # the two files of a MauiIcon, and the line for the .csproj
xd-icon --help

Small sizes drawn apart

A drawing made for 256 px blurs at 16 px. Variants for the small sizes sit next to the main image, named after it with the largest size they draw:

app.svg       48 px and more
app.40.svg    25 to 40 px (e.g. fewer details)
app.24.svg    up to 24 px (e.g. shapes on whole pixels)

The smallest variant that fits a size draws it. Variants can be png (app.16.png), a pixel-perfect image for one size.

MAUI

--maui <color> writes appicon.svg, a square of the color, and appiconfg.svg, a copy of the icon, then prints the line to put in the .csproj:

<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg"
          ForegroundScale="0.65" Color="#1B1E25" />

MAUI resizes them for every platform; ForegroundScale keeps the icon within the part of an Android adaptive icon that its masks (circle, squircle) never cut.

Publish a new version

.\publish.ps1 -Bump                                           # local feed (%UserProfile%\nuget_local)
$env:NUGET_API_KEY = '...'; .\publish.ps1 -Bump -NuGetOrg    # tests, then nuget.org

License

MIT. Renders svg with Svg.Skia (MIT) and SkiaSharp (MIT).

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.0 116 10/13/2026