Nyan.MaterialDesign.Color.Schemes.Custom
1.0.2
dotnet add package Nyan.MaterialDesign.Color.Schemes.Custom --version 1.0.2
NuGet\Install-Package Nyan.MaterialDesign.Color.Schemes.Custom -Version 1.0.2
<PackageReference Include="Nyan.MaterialDesign.Color.Schemes.Custom" Version="1.0.2" />
<PackageVersion Include="Nyan.MaterialDesign.Color.Schemes.Custom" Version="1.0.2" />
<PackageReference Include="Nyan.MaterialDesign.Color.Schemes.Custom" />
paket add Nyan.MaterialDesign.Color.Schemes.Custom --version 1.0.2
#r "nuget: Nyan.MaterialDesign.Color.Schemes.Custom, 1.0.2"
#:package Nyan.MaterialDesign.Color.Schemes.Custom@1.0.2
#addin nuget:?package=Nyan.MaterialDesign.Color.Schemes.Custom&version=1.0.2
#tool nuget:?package=Nyan.MaterialDesign.Color.Schemes.Custom&version=1.0.2
MaterialDesign.Color.Schemes.Custom adds support for creating custom color schemes and themes with customized rules.
These custom schemes aren't just custom colors, but custom rules, like the gap between core and on-core colors,
the gap between light and dark mode schemes, custom handling of secondary, tertiary, and surface color generation,
and more.
To create these custom schemes, create a new record inheriting from CustomSchemeBase, and then define all the
abstract properties, alongside overriding the virtual ones — should you wish to use them. Then, to construct the scheme,
create a constructor using the base(HCTA) constructor, and that should let you access all the colors from the record
successfully. Using primary constructor syntax, the start of your class could look like:
using MaterialDesign.Color.Schemes.Custom;
public sealed record CustomScheme(HCTA Source) : CustomSchemeBase(Source)
{
// implementations
}
Additionally, you can use extensions to IServiceCollection and then use the ThemeCollection class in DI that
supports IScheme classes (which CustomSourceBase inherits from), so you can use that instead of a regular Theme
(which is still a great choice for ease-of-use, or if you don't need the extra customization).
For schemes that can be changed at runtime, the ModifiableCustomScheme is an option in that case.
Additionally, on the ModifiableCustomScheme, changing the Hue, Chroma, and Tone properties on the instance
instead of modifying the Origin is recommended. Otherwise, using the Update() method instead would be the next option.
| Product | Versions 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. |
-
net8.0
- Nyan.MaterialDesign.Color (>= 1.1.3)
- Nyan.MaterialDesign.Color.Extensions (>= 1.0.1)
- Nyan.MaterialDesign.Theming (>= 1.1.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.