![]() |
VOOZH | about |
dotnet add package ktsu.ThemeProvider.ImGui --version 1.0.13
NuGet\Install-Package ktsu.ThemeProvider.ImGui -Version 1.0.13
<PackageReference Include="ktsu.ThemeProvider.ImGui" Version="1.0.13" />
<PackageVersion Include="ktsu.ThemeProvider.ImGui" Version="1.0.13" />Directory.Packages.props
<PackageReference Include="ktsu.ThemeProvider.ImGui" />Project file
paket add ktsu.ThemeProvider.ImGui --version 1.0.13
#r "nuget: ktsu.ThemeProvider.ImGui, 1.0.13"
#:package ktsu.ThemeProvider.ImGui@1.0.13
#addin nuget:?package=ktsu.ThemeProvider.ImGui&version=1.0.13Install as a Cake Addin
#tool nuget:?package=ktsu.ThemeProvider.ImGui&version=1.0.13Install as a Cake Tool
A semantic color theming library for .NET applications
ThemeProvider is a comprehensive theming system that uses semantic color specifications rather than arbitrary color names. It provides a unified approach to theming across different UI frameworks through intelligent color mapping and includes 44+ carefully crafted themes from popular color schemes.
dotnet add package ktsu.ThemeProvider
# For ImGui integration:
dotnet add package ktsu.ThemeProvider.ImGui
using ktsu.ThemeProvider;
using static ktsu.ThemeProvider.ThemeRegistry;
// Discover available themes
var allThemes = AllThemes;
var darkThemes = DarkThemes;
var catppuccinThemes = GetThemesInFamily("Catppuccin");
// Find and create a specific theme
var themeInfo = FindTheme("Catppuccin Mocha");
var theme = themeInfo?.CreateInstance();
// Request semantic colors
var primaryColor = theme.GetColor(new SemanticColorRequest(SemanticMeaning.Primary, Priority.Medium));
var warningColor = theme.GetColor(new SemanticColorRequest(SemanticMeaning.Warning, Priority.High));
using ktsu.ThemeProvider.ImGui;
// Create theme and mapper
var theme = new Themes.Catppuccin.Mocha();
var imguiMapper = new ImGuiPaletteMapper();
// Get complete ImGui color palette
var imguiColors = imguiMapper.MapTheme(theme);
// Apply to ImGui (in your render loop)
var style = ImGui.GetStyle();
foreach ((ImGuiCol colorKey, Vector4 colorValue) in imguiColors)
{
style.Colors[(int)colorKey] = colorValue;
}
The ThemeRegistry provides centralized access to all available themes with rich metadata:
// Browse themes by family
foreach (string family in Families)
{
var themesInFamily = GetThemesInFamily(family);
Console.WriteLine($"{family}: {themesInFamily.Length} variants");
}
// Filter themes
var lightThemes = LightThemes;
var darkThemes = DarkThemes;
// Create theme instances
var allThemeInstances = CreateAllThemeInstances();
var gruvboxInstances = CreateThemeInstancesInFamily("Gruvbox");
| Family | Variants | Description |
|---|---|---|
| Catppuccin | 4 variants (Latte, Frappe, Macchiato, Mocha) | Warm pastel themes with excellent readability |
| Tokyo Night | 3 variants (Night, Storm, Day) | Clean themes inspired by Tokyo's neon nights |
| Gruvbox | 6 variants (Dark, Light × Hard, Medium, Soft) | Retro groove colors with warm backgrounds |
| Everforest | 6 variants (Dark, Light × Hard, Medium, Soft) | Green forest colors for comfortable viewing |
| Nightfox | 7 variants (Nightfox, Dayfox, Duskfox, etc.) | Fox-inspired vibrant themes |
| Kanagawa | 3 variants (Wave, Dragon, Lotus) | Japanese-inspired themes |
| PaperColor | 2 variants (Light, Dark) | Material Design inspired themes |
| Single Variants | Nord, Dracula, VSCode, One Dark, Monokai, Nightfly |
Instead of hardcoding colors like "blue" or "red", ThemeProvider uses semantic specifications:
// ❌ Traditional approach
var buttonColor = Color.Blue;
var errorColor = Color.Red;
// ✅ Semantic approach
var buttonColor = theme.GetColor(new SemanticColorRequest(SemanticMeaning.Primary, Priority.Medium));
var errorColor = theme.GetColor(new SemanticColorRequest(SemanticMeaning.Error, Priority.High));
Priorities control color intensity and importance:
// Accessibility checking
float contrastRatio = ColorMath.GetContrastRatio(foreground, background);
var accessibilityLevel = ColorMath.GetAccessibilityLevel(foreground, background, isLargeText);
// Color space conversions
var oklchColor = rgbColor.ToOklch();
var adjustedColor = oklchColor.WithLightness(0.7f).ToRgb();
public class ImGuiPaletteMapper : IPaletteMapper<ImGuiCol, Vector4>
{
public string FrameworkName => "Dear ImGui";
public ImmutableDictionary<ImGuiCol, Vector4> MapTheme(ISemanticTheme theme)
{
// Systematic mapping of all ImGui colors using semantic specifications
}
}
public class MyFrameworkMapper : IPaletteMapper<MyColorEnum, MyColorType>
{
public string FrameworkName => "My UI Framework";
public ImmutableDictionary<MyColorEnum, MyColorType> MapTheme(ISemanticTheme theme)
{
var requests = new Dictionary<MyColorEnum, SemanticColorRequest>
{
{ MyColorEnum.Button, new(SemanticMeaning.Primary, Priority.Medium) },
{ MyColorEnum.Background, new(SemanticMeaning.Neutral, Priority.VeryLow) },
// ... other mappings
};
var mappedColors = SemanticColorMapper.MapColors(requests.Values, theme);
return requests.ToDictionary(
kvp => kvp.Key,
kvp => ConvertToMyColorType(mappedColors[kvp.Value])
).ToImmutableDictionary();
}
}
The project showcases all features:
// Pattern 1: Direct theme usage
var theme = new Themes.Catppuccin.Mocha();
var primaryColor = theme.GetColor(new(SemanticMeaning.Primary, Priority.Medium));
// Pattern 2: Theme registry approach
var themeInfo = FindTheme("Tokyo Night Storm");
var theme = themeInfo?.CreateInstance();
// Pattern 3: Bulk color mapping
var colorRequests = new[]
{
new SemanticColorRequest(SemanticMeaning.Primary, Priority.Medium),
new SemanticColorRequest(SemanticMeaning.Error, Priority.High),
new SemanticColorRequest(SemanticMeaning.Success, Priority.High),
};
var mappedColors = SemanticColorMapper.MapColors(colorRequests, theme);
dotnet build
dotnet run --project ThemeProviderDemo
ThemeProvider/
├── ThemeProvider/ # Core semantic color system
│ ├── Themes/ # All 44 theme implementations
│ ├── SemanticColorMapper.cs # Color interpolation engine
│ ├── ThemeRegistry.cs # Centralized theme discovery
│ └── ColorMath.cs # Accessibility and color operations
├── ThemeProvider.ImGui/ # Dear ImGui integration
└── ThemeProviderDemo/ # Comprehensive demo application
Licensed under the MIT License. See for details.
Contributions are welcome! Please ensure:
Made with ❤️ by ktsu.dev
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 is compatible. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 2 NuGet packages that depend on ktsu.ThemeProvider.ImGui:
| Package | Downloads |
|---|---|
|
ktsu.ImGuiStyler
A library for expressively styling ImGui.NET interfaces. |
|
|
ktsu.ImGui.Styler
A powerful styling library for ImGui.NET interfaces featuring 50+ built-in themes (Catppuccin, Tokyo Night, Gruvbox, Dracula, Nord, and more), interactive theme browser, scoped styling system for colors and style variables, advanced color manipulation with hex support and accessibility features, automatic content alignment and centering, semantic text colors, button alignment, and indentation utilities. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.21 | 58 | 6/22/2026 |
| 1.0.20 | 121 | 6/15/2026 |
| 1.0.19 | 115 | 6/13/2026 |
| 1.0.18 | 276 | 6/12/2026 |
| 1.0.17 | 1,214 | 2/19/2026 |
| 1.0.17-pre.1 | 73 | 2/17/2026 |
| 1.0.16 | 124 | 2/16/2026 |
| 1.0.16-pre.1 | 78 | 2/16/2026 |
| 1.0.15 | 121 | 2/14/2026 |
| 1.0.14 | 123 | 2/14/2026 |
| 1.0.14-pre.4 | 88 | 2/1/2026 |
| 1.0.14-pre.3 | 77 | 1/31/2026 |
| 1.0.14-pre.2 | 81 | 1/31/2026 |
| 1.0.14-pre.1 | 75 | 1/31/2026 |
| 1.0.13 | 134 | 1/30/2026 |
| 1.0.12 | 127 | 1/28/2026 |
| 1.0.11 | 1,301 | 1/27/2026 |
| 1.0.11-pre.4 | 79 | 1/24/2026 |
| 1.0.11-pre.3 | 177 | 11/24/2025 |
| 1.0.11-pre.2 | 146 | 11/23/2025 |
## v1.0.13 (patch)
Changes since v1.0.12:
- Remove .github\workflows\project.yml ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.12 (patch)
Changes since v1.0.11:
- Refactor null check in MapTheme method to use Ensure.NotNull ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.11 (patch)
Changes since v1.0.10:
- Migrate to dotnet 10 ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.11-pre.4 (prerelease)
Changes since v1.0.11-pre.3:
- Sync .gitignore ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync .github\workflows\update-sdks.yml ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync .github\workflows\dotnet.yml ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.11-pre.3 (prerelease)
Changes since v1.0.11-pre.2:
- Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.11-pre.2 (prerelease)
Changes since v1.0.11-pre.1:
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync .github\workflows\dotnet.yml ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.11-pre.1 (prerelease)
Incremental prerelease update.
## v1.0.10 (patch)
Changes since v1.0.9:
- Refactor SonarQube scanner steps and update coverage report paths in CI workflow ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.9 (patch)
Changes since v1.0.8:
- Update sdk ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.9-pre.3 (prerelease)
Changes since v1.0.9-pre.2:
## v1.0.9-pre.2 (prerelease)
Changes since v1.0.9-pre.1:
- Bump the ktsu group with 1 update ([@dependabot[bot]](https://github.com/dependabot[bot]))
## v1.0.9-pre.1 (prerelease)
Incremental prerelease update.
## v1.0.8 (patch)
Changes since v1.0.7:
- Refactor method name for palette generation in SemanticColorMapper ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.7 (patch)
Changes since v1.0.6:
- Add complete palette generation and improve ImGui color mapping ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.6 (patch)
Changes since v1.0.5:
- [patch] Force patch ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.6-pre.1 (prerelease)
Incremental prerelease update.
## v1.0.5 (patch)
Changes since v1.0.4:
- Upgrade ktsu.Sdk to version 1.49.0 ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.4 (patch)
Changes since v1.0.3:
- Add ThemeRegistry and update documentation for ThemeProvider ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.3 (patch)
Changes since v1.0.2:
- Add new themes: Everforest Dark Hard, Everforest Dark Soft, Everforest Light Hard, and Everforest Light Soft ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.2 (patch)
Changes since v1.0.1:
- Refactor Catppuccin, Dracula, and other themes to streamline Neutrals collection ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.1 (patch)
Changes since v1.0.0:
- Add new themes: Dracula, Everforest, Gruvbox, Monokai, Nightfly, One Dark, Tokyo Night, and VSCode ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.0 (major)
- Refactor semantic color specifications to remove 'IsPrimary' property ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor ThemeProvider to implement semantic color system and Catppuccin Mocha theme ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor ThemeProviderDemo to fully integrate semantic color system ([@matt-edmondson](https://github.com/matt-edmondson))
- Add new semantic color system and Catppuccin Mocha theme implementation ([@matt-edmondson](https://github.com/matt-edmondson))
- Implement ImGui palette mapping and enhance semantic color integration ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor ThemeProviderDemo to enhance semantic color grid rendering ([@matt-edmondson](https://github.com/matt-edmondson))
- Initial commit: Add project structure with essential configuration files, including .editorconfig, .gitattributes, .gitignore, and .runsettings. Introduce core project files such as ThemeProvider and ThemeProviderDemo, along with necessary scripts for CI/CD automation and SDK management. Include licensing and author information, and set up GitHub workflows for dependency management and project automation. ([@matt-edmondson](https://github.com/matt-edmondson))
- Add Catppuccin Mocha theme implementation and color management utilities ([@matt-edmondson](https://github.com/matt-edmondson))
- Add Catppuccin themes: Frappe, Latte, and Macchiato implementations ([@matt-edmondson](https://github.com/matt-edmondson))
- Enhance SemanticColorMapper and ImGuiPaletteMapper for improved color contrast and priority handling ([@matt-edmondson](https://github.com/matt-edmondson))
- Enhance ThemeProviderDemo with UI improvements and semantic palette features ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor SemanticColorMapper and ThemeProviderDemo for improved lightness calculations and semantic color handling ([@matt-edmondson](https://github.com/matt-edmondson))
- Enhance color extrapolation logic in SemanticColorMapper ([@matt-edmondson](https://github.com/matt-edmondson))
- Enhance SemanticColorMapper and ThemeProviderDemo for complete semantic color mapping ([@matt-edmondson](https://github.com/matt-edmondson))
- Add ColorRange and SemanticColorMapper classes for enhanced color interpolation and mapping ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor SemanticColorMapper for improved lightness-based color mapping ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor ImGuiPaletteMapper to enhance semantic color usage ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor ImGuiPaletteMapper for improved priority distribution and contrast ([@matt-edmondson](https://github.com/matt-edmondson))