ktsu.ThemeProvider.ImGui 1.0.15
ThemeProvider.ImGui
Semantic theme mapping for Dear ImGui applications
This library provides seamless integration between ThemeProvider's semantic color system and Dear ImGui, automatically generating complete ImGui color palettes from semantic themes.
Features
- 🎨 Complete ImGui Coverage: Maps all 50+ ImGui colors systematically
- 🧠Semantic Intelligence: Uses semantic specifications (meaning, role, importance) rather than arbitrary color names
- âš¡ One-Line Integration: Replace manual color mapping with a single method call
- 🎯 Smart Defaults: Automatic fallbacks for unmapped colors
- 🔧 Interactive States: Brightness adjustments for hover/active states
- ♿ Accessibility Aware: Maintains proper contrast ratios
Installation
Add a reference to the ThemeProvider.ImGui package:
<PackageReference Include="ktsu.ThemeProvider.ImGui" />
Quick Start
using ktsu.ThemeProvider.ImGui;
using ktsu.ThemeProvider.Themes.Catppuccin;
// Create your semantic theme
var theme = CatppuccinMocha.CreateTheme();
// Create the mapper
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;
}
Semantic Mappings
The mapper intelligently maps semantic specifications to ImGui colors:
| ImGui Element | Semantic Mapping |
|---|---|
ImGuiCol.Text |
Normal/Text/Critical |
ImGuiCol.Button |
CallToAction/Widget/Critical |
ImGuiCol.WindowBg |
Normal/Background/Low |
ImGuiCol.FrameBg |
Normal/Surface/Low |
ImGuiCol.PlotHistogram |
Success/Widget/High |
ImGuiCol.TextSelectedBg |
CallToAction/Surface/Medium |
Advanced Usage
Custom Framework Integration
// Implement IPaletteMapper for other UI frameworks
public class MyFrameworkMapper : IPaletteMapper<MyFrameworkColor, MyColorType>
{
public string FrameworkName => "My UI Framework";
public ImmutableDictionary<MyFrameworkColor, MyColorType> MapTheme(ThemeDefinition theme)
{
// Your mapping logic here
}
}
Metadata and Diagnostics
var metadata = imguiMapper.GetMappingMetadata(theme);
Console.WriteLine($"Mapped {metadata["mapped_colors_count"]} colors");
Console.WriteLine($"Theme: {metadata["theme_name"]} ({metadata["theme_type"]})");
Benefits Over Manual Mapping
Before (Manual approach):
// Tedious manual mapping of 50+ colors
colors[ImGuiCol.Text] = theme.GetColor(new SemanticColorSpec(...));
colors[ImGuiCol.Button] = theme.GetColor(new SemanticColorSpec(...));
colors[ImGuiCol.WindowBg] = theme.GetColor(new SemanticColorSpec(...));
// ... 50+ more lines
// Missing colors = broken UI
// Inconsistent semantic usage
After (Systematic approach):
// One line for complete, consistent theming
var imguiColors = imguiMapper.MapTheme(theme);
// All colors mapped systematically
// Automatic fallbacks
// Semantic consistency guaranteed
Examples
See the ThemeProviderDemo project for a complete working example showcasing:
- Theme overview and color exploration
- Semantic color specification builder
- Live palette generation
- ImGui mapping demonstration
- Accessibility testing
Contributing
This library is part of the broader ThemeProvider ecosystem. Contributions are welcome! Please follow the semantic color principles:
- Semantic First: Colors should be defined by purpose, not appearance
- Systematic: Mappings should follow consistent patterns
- Accessible: Always consider contrast and readability
- Extensible: Design for easy adaptation to other frameworks
License
Licensed under the MIT License. See LICENSE for details.
Showing the top 20 packages that depend on ktsu.ThemeProvider.ImGui.
| Packages | Downloads |
|---|---|
|
ktsu.ImGui.Styler
Package Description
|
150 |
|
ktsu.ImGui.Styler
Package Description
|
147 |
|
ktsu.ImGui.Styler
Package Description
|
145 |
|
ktsu.ImGui.Styler
Package Description
|
143 |
|
ktsu.ImGui.Styler
Package Description
|
142 |
|
ktsu.ImGui.Styler
Package Description
|
90 |
|
ktsu.ImGui.Styler
Package Description
|
62 |
|
ktsu.ImGui.Styler
Package Description
|
61 |
|
ktsu.ImGui.Styler
Package Description
|
60 |
|
ktsu.ImGui.Styler
A library for expressively styling ImGui.NET interfaces.
|
60 |
|
ktsu.ImGui.Styler
Package Description
|
59 |
|
ktsu.ImGui.Styler
A library for expressively styling ImGui.NET interfaces.
|
59 |
|
ktsu.ImGui.Styler
Package Description
|
58 |
|
ktsu.ImGui.Styler
A library for expressively styling ImGui.NET interfaces.
|
58 |
|
ktsu.ImGui.Styler
Package Description
|
57 |
## v1.0.15 (patch)
Changes since v1.0.14:
- Remove legacy build scripts ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.14 (patch)
Changes since v1.0.13:
- Sync .github\workflows\dotnet.yml ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync COPYRIGHT.md ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync COPYRIGHT.md ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.14-pre.7 (prerelease)
Changes since v1.0.14-pre.6:
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.14-pre.6 (prerelease)
Changes since v1.0.14-pre.5:
- Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.14-pre.5 (prerelease)
Changes since v1.0.14-pre.4:
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.14-pre.4 (prerelease)
Changes since v1.0.14-pre.3:
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.14-pre.3 (prerelease)
Changes since v1.0.14-pre.2:
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync COPYRIGHT.md ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.14-pre.2 (prerelease)
Changes since v1.0.14-pre.1:
- Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
## v1.0.14-pre.1 (prerelease)
No significant changes detected since v1.0.14.
## 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 scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync .github\workflows\update-sdks.yml ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync .github\workflows\dotnet.yml ([@ktsu[bot]](https://github.com/ktsu[bot]))
- Sync .gitignore ([@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)
No significant changes detected since v1.0.11.
## 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))
- Update package versions and refactor theme provider interfaces ([@matt-edmondson](https://github.com/matt-edmondson))
- Update ktsu.ImGuiApp package version to 2.1.0 ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.9-pre.3 (prerelease)
Changes since v1.0.9-pre.2:
- Update package versions and refactor theme provider interfaces ([@matt-edmondson](https://github.com/matt-edmondson))
## 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)
No significant changes detected since v1.0.9.
## 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))
- Update package versions and UI color mappings ([@matt-edmondson](https://github.com/matt-edmondson))
## v1.0.6-pre.1 (prerelease)
No significant changes detected since v1.0.6.
## 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)
- Add Catppuccin themes: Frappe, Latte, and Macchiato implementations ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor ThemeProviderDemo to enhance semantic color grid rendering ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor ImGuiPaletteMapper for improved priority distribution and contrast ([@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 SemanticColorMapper and ImGuiPaletteMapper for improved color contrast and priority handling ([@matt-edmondson](https://github.com/matt-edmondson))
- Enhance SemanticColorMapper and ThemeProviderDemo for complete semantic color mapping ([@matt-edmondson](https://github.com/matt-edmondson))
- Enhance color extrapolation logic in SemanticColorMapper ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor SemanticColorMapper for improved lightness-based 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))
- Add new semantic color system and Catppuccin Mocha theme implementation ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor semantic color specifications to remove 'IsPrimary' property ([@matt-edmondson](https://github.com/matt-edmondson))
- Refactor ImGuiPaletteMapper to enhance semantic color usage ([@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 fully integrate semantic color system ([@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))
- Enhance ThemeProviderDemo with UI improvements and semantic palette features ([@matt-edmondson](https://github.com/matt-edmondson))
- Add Catppuccin Mocha theme implementation and color management utilities ([@matt-edmondson](https://github.com/matt-edmondson))
.NET 5.0
- ktsu.ThemeProvider (>= 1.0.15)
- Hexa.NET.ImGui (>= 2.2.8.5)
- Microsoft.SourceLink.AzureRepos.Git (>= 8.0.0)
- Microsoft.SourceLink.GitHub (>= 8.0.0)
.NET Standard 2.1
- Microsoft.SourceLink.GitHub (>= 8.0.0)
- Microsoft.SourceLink.AzureRepos.Git (>= 8.0.0)
- Hexa.NET.ImGui (>= 2.2.8.5)
- ktsu.ThemeProvider (>= 1.0.15)
.NET Standard 2.0
- Microsoft.SourceLink.GitHub (>= 8.0.0)
- Microsoft.SourceLink.AzureRepos.Git (>= 8.0.0)
- Hexa.NET.ImGui (>= 2.2.8.5)
- ktsu.ThemeProvider (>= 1.0.15)
.NET 10.0
- Microsoft.SourceLink.GitHub (>= 8.0.0)
- Microsoft.SourceLink.AzureRepos.Git (>= 8.0.0)
- Hexa.NET.ImGui (>= 2.2.8.5)
- ktsu.ThemeProvider (>= 1.0.15)
.NET 9.0
- Microsoft.SourceLink.GitHub (>= 8.0.0)
- Microsoft.SourceLink.AzureRepos.Git (>= 8.0.0)
- Hexa.NET.ImGui (>= 2.2.8.5)
- ktsu.ThemeProvider (>= 1.0.15)
.NET 8.0
- Microsoft.SourceLink.AzureRepos.Git (>= 8.0.0)
- Microsoft.SourceLink.GitHub (>= 8.0.0)
- ktsu.ThemeProvider (>= 1.0.15)
- Hexa.NET.ImGui (>= 2.2.8.5)
.NET 6.0
- Hexa.NET.ImGui (>= 2.2.8.5)
- Microsoft.SourceLink.AzureRepos.Git (>= 8.0.0)
- Microsoft.SourceLink.GitHub (>= 8.0.0)
- ktsu.ThemeProvider (>= 1.0.15)
.NET 7.0
- Hexa.NET.ImGui (>= 2.2.8.5)
- Microsoft.SourceLink.AzureRepos.Git (>= 8.0.0)
- Microsoft.SourceLink.GitHub (>= 8.0.0)
- ktsu.ThemeProvider (>= 1.0.15)
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.16 | 1 | 02/16/2026 |
| 1.0.16-pre.1 | 2 | 02/16/2026 |
| 1.0.15 | 17 | 02/14/2026 |
| 1.0.14 | 15 | 02/14/2026 |
| 1.0.14-pre.4 | 53 | 02/01/2026 |
| 1.0.14-pre.3 | 53 | 01/31/2026 |
| 1.0.14-pre.2 | 53 | 01/31/2026 |
| 1.0.14-pre.1 | 54 | 01/31/2026 |
| 1.0.13 | 54 | 01/30/2026 |
| 1.0.12 | 56 | 01/28/2026 |
| 1.0.11 | 57 | 01/27/2026 |
| 1.0.11-pre.4 | 56 | 01/24/2026 |
| 1.0.11-pre.3 | 146 | 11/24/2025 |
| 1.0.11-pre.2 | 143 | 11/23/2025 |
| 1.0.11-pre.1 | 141 | 11/23/2025 |
| 1.0.10 | 149 | 11/23/2025 |
| 1.0.9 | 149 | 09/04/2025 |
| 1.0.9-pre.3 | 143 | 08/25/2025 |