Scott.Avatar.Generator 0.0.2-beta.2

This is a prerelease version of Scott.Avatar.Generator.
dotnet add package Scott.Avatar.Generator --version 0.0.2-beta.2
                    
NuGet\Install-Package Scott.Avatar.Generator -Version 0.0.2-beta.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Scott.Avatar.Generator" Version="0.0.2-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Scott.Avatar.Generator" Version="0.0.2-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="Scott.Avatar.Generator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Scott.Avatar.Generator --version 0.0.2-beta.2
                    
#r "nuget: Scott.Avatar.Generator, 0.0.2-beta.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Scott.Avatar.Generator@0.0.2-beta.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Scott.Avatar.Generator&version=0.0.2-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Scott.Avatar.Generator&version=0.0.2-beta.2&prerelease
                    
Install as a Cake Tool

Scott.Avatar.Generator

A faithful C# port of the Draftbit Personas avatar generator. Produces inclusive, layered SVG avatars as plain strings — no native dependencies, no I/O, safe to call from anywhere (web, desktop, functions).

Targets .NET 8.0, so it can be consumed from any .NET 8+ project.

Install

dotnet add package Scott.Avatar.Generator

Usage

using Scott.Avatar.Generator;

// The default avatar (matches the original app's defaults)
string svg = AvatarGenerator.Generate();

// Fully customised
var options = new AvatarOptions
{
    Hair = "Mohawk", HairColor = "5AC4D4",
    Eyes = "Wink", Mouth = "Smile",
    FacialHair = "None",
    BodyColor = "456DFF", BgColor = "A9E775",
};
string custom = AvatarGenerator.Generate(options, size: 256);

// Random (seed for reproducibility)
var random = AvatarGenerator.Generate(AvatarOptions.Random(random: new Random(42)));

// A single part on its own
string mohawk = AvatarGenerator.RenderPart("Mohawk", "#5AC4D4", size: 128);

// Discover valid styles & palettes
AvatarConfig config = AvatarConfig.Default;

Colours are hex strings without a leading # (e.g. "5AC4D4"), matching the original configuration. See AvatarConfig.Default for every available style and palette.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.2-beta.2 80 6/11/2026
0.0.2-beta.1 76 6/6/2026