Meziantou.Framework.Avatar
2.0.2
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Meziantou.Framework.Avatar --version 2.0.2
NuGet\Install-Package Meziantou.Framework.Avatar -Version 2.0.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="Meziantou.Framework.Avatar" Version="2.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.Avatar" Version="2.0.2" />
<PackageReference Include="Meziantou.Framework.Avatar" />
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 Meziantou.Framework.Avatar --version 2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.Framework.Avatar, 2.0.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 Meziantou.Framework.Avatar@2.0.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=Meziantou.Framework.Avatar&version=2.0.2
#tool nuget:?package=Meziantou.Framework.Avatar&version=2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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);
| Product | Versions 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. net11.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- System.IO.Hashing (>= 10.0.11)
-
net11.0
- System.IO.Hashing (>= 10.0.11)
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 |
|---|---|---|
| 2.1.9 | 66 | 11/15/2026 |
| 2.1.8 | 63 | 11/14/2026 |
| 2.1.7 | 56 | 11/13/2026 |
| 2.1.6 | 98 | 11/8/2026 |
| 2.1.5 | 170 | 10/28/2026 |
| 2.1.4 | 96 | 10/21/2026 |
| 2.1.3 | 99 | 10/16/2026 |
| 2.1.2 | 131 | 9/11/2026 |
| 2.1.1 | 130 | 9/6/2026 |
| 2.1.0 | 129 | 9/4/2026 |
| 2.0.2 | 132 | 8/29/2026 |
| 2.0.1 | 134 | 8/9/2026 |
| 2.0.0 | 154 | 7/5/2026 |
| 1.0.6 | 139 | 6/28/2026 |
| 1.0.5 | 153 | 6/13/2026 |
| 1.0.4 | 148 | 6/7/2026 |
| 1.0.3 | 137 | 5/23/2026 |
| 1.0.2 | 140 | 5/14/2026 |
| 1.0.1 | 140 | 4/25/2026 |
| 1.0.0 | 148 | 4/6/2026 |