Install
dotnet add package Meziantou.Framework.Avatar --version 1.0.6
| Product | Versions |
|---|---|
| .NET |
README
Meziantou.Framework.Avatar
Generate deterministic avatar SVG strings from a name.
Usage
using Meziantou.Framework;
var svg = AvatarGenerator.CreateSvg("John Doe", new AvatarOptions());
AvatarGenerator extracts a 1-2 character bigram and selects a foreground/background pair from the palette using a hash of the provided name.
Customize the output
using Meziantou.Framework;
var options = new AvatarOptions
{
Bigram = "JD", // optional explicit 1-2 character bigram
Shape = AvatarShape.Round, // Round, Square, or RoundedSquare
Size = 128,
};
options.Palette.Clear();
options.Palette.Add(new AvatarColorPair("#CFDADE", "#153037"));
var svg = AvatarGenerator.CreateSvg("John Doe", options);
Changes from Previous Version
No structural changes between v1.0.5 and v1.0.6.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Compatibility metadata lists 4 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.