{"id":26800618,"url":"https://github.com/ktsu-dev/imguistyler","last_synced_at":"2025-09-01T09:41:41.440Z","repository":{"id":231659117,"uuid":"782339043","full_name":"ktsu-dev/ImGuiStyler","owner":"ktsu-dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-24T23:07:21.000Z","size":851,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T00:37:40.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ktsu-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT.md","agents":null,"dco":null,"cla":null}},"created_at":"2024-04-05T05:24:27.000Z","updated_at":"2025-07-24T23:07:25.000Z","dependencies_parsed_at":"2024-04-15T01:29:28.236Z","dependency_job_id":"e3345cd3-aa2a-4e61-ae79-4eaf444fc71d","html_url":"https://github.com/ktsu-dev/ImGuiStyler","commit_stats":null,"previous_names":["ktsu-io/imguistyler","ktsu-dev/imguistyler"],"tags_count":161,"template":false,"template_full_name":null,"purl":"pkg:github/ktsu-dev/ImGuiStyler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiStyler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiStyler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiStyler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiStyler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktsu-dev","download_url":"https://codeload.github.com/ktsu-dev/ImGuiStyler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FImGuiStyler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273100869,"owners_count":25045700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-29T20:18:11.168Z","updated_at":"2025-09-01T09:41:41.412Z","avatar_url":"https://github.com/ktsu-dev.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImGuiStyler 🎨\n\n[![Version](https://img.shields.io/badge/version-1.3.10-blue.svg)](VERSION.md)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE.md)\n\n**A powerful, expressive styling library for ImGui.NET interfaces** that simplifies theme management, provides scoped styling utilities, and offers advanced color manipulation with accessibility features.\n\n## ✨ Features\n\n### 🎨 **Advanced Theme System**\n- **50+ Built-in Themes**: Comprehensive collection including Catppuccin, Dracula, Gruvbox, Tokyo Night, Nord, and many more\n- **Interactive Theme Browser**: Visual theme selection with live preview and categorization\n- **Semantic Theme Support**: Leverages `ktsu.ThemeProvider` for consistent, semantic color theming\n- **Scoped Theme Application**: Apply themes to specific UI sections without affecting the global style\n\n### 🎯 **Precise Alignment Tools**\n- **Automatic Content Centering**: Center any content within containers or available regions\n- **Flexible Container Alignment**: Align content within custom-sized containers\n- **Layout Integration**: Seamlessly works with ImGui's existing layout system\n\n### 🌈 **Advanced Color Management**\n- **Hex Color Support**: Direct conversion from hex strings to ImGui colors\n- **Accessibility-First**: Automatic contrast calculation and optimal text color selection\n- **Color Manipulation**: Lighten, darken, and adjust colors programmatically\n- **Scoped Color Application**: Apply colors to specific UI elements without side effects\n\n### 🔧 **Scoped Styling System**\n- **Style Variables**: Apply temporary style modifications with automatic cleanup\n- **Text Colors**: Scoped text color changes with proper restoration\n- **Theme Colors**: Apply theme-based colors to specific UI sections\n- **Memory Safe**: Automatic resource management and style restoration\n\n## 📦 Installation\n\nAdd ImGuiStyler to your project via NuGet:\n\n```xml\n\u003cPackageReference Include=\"ktsu.ImGuiStyler\" Version=\"1.3.10\" /\u003e\n```\n\nOr via Package Manager Console:\n```powershell\nInstall-Package ktsu.ImGuiStyler\n```\n\n## 🚀 Quick Start\n\n```csharp\nusing ktsu.ImGuiStyler;\nusing Hexa.NET.ImGui;\n\n// Apply a global theme\nTheme.Apply(\"TokyoNight\");\n\n// Use scoped styling for specific elements\nusing (new ScopedColor(ImGuiCol.Text, Color.FromHex(\"#ff6b6b\")))\n{\n    ImGui.Text(\"This text is red!\");\n}\n\n// Center content automatically\nusing (new Alignment.Center(ImGui.CalcTextSize(\"Centered!\")))\n{\n    ImGui.Text(\"Centered!\");\n}\n```\n\n## 📚 Comprehensive Usage Guide\n\n### 🎨 Theme Management\n\n#### Applying Global Themes\n```csharp\n// Apply any of the 50+ built-in themes\nTheme.Apply(\"Catppuccin.Mocha\");\nTheme.Apply(\"Gruvbox.Dark\");\nTheme.Apply(\"Tokyo Night\");\n\n// Get current theme information\nstring? currentTheme = Theme.CurrentThemeName;\nbool isCurrentThemeDark = Theme.IsCurrentThemeDark;\n\n// Reset to default ImGui theme\nTheme.Reset();\n```\n\n#### Interactive Theme Browser\n```csharp\n// Show the theme browser modal\nif (ImGui.Button(\"Choose Theme\"))\n{\n    Theme.ShowThemeSelector(\"Select a Theme\");\n}\n\n// Render the theme selector (call this in your main render loop)\nif (Theme.RenderThemeSelector())\n{\n    Console.WriteLine($\"Theme changed to: {Theme.CurrentThemeName}\");\n}\n```\n\n#### Scoped Theme Application\n```csharp\nusing (new ScopedTheme(\"Dracula\"))\n{\n    ImGui.Text(\"This text uses Dracula theme\");\n    ImGui.Button(\"Themed button\");\n    \n    using (new ScopedTheme(\"Nord\"))\n    {\n        ImGui.Text(\"Nested Nord theme\");\n    }\n    // Automatically reverts to Dracula\n}\n// Automatically reverts to previous theme\n```\n\n### 🌈 Color Management\n\n#### Creating Colors\n```csharp\n// From hex strings\nImColor red = Color.FromHex(\"#ff0000\");\nImColor blueWithAlpha = Color.FromHex(\"#0066ffcc\");\n\n// From RGB values\nImColor green = Color.FromRGB(0, 255, 0);\nImColor customColor = Color.FromRGBA(255, 128, 64, 200);\n\n// From HSV\nImColor rainbow = Color.FromHSV(0.83f, 1.0f, 1.0f); // Purple\n```\n\n#### Color Manipulation\n```csharp\nImColor baseColor = Color.FromHex(\"#3498db\");\n\n// Adjust brightness\nImColor lighter = Color.Lighten(baseColor, 0.3f);\nImColor darker = Color.Darken(baseColor, 0.2f);\n\n// Accessibility-focused text colors\nImColor optimalText = Color.GetOptimalTextColor(baseColor);\nImColor contrastText = Color.GetContrastingTextColor(baseColor);\n```\n\n#### Scoped Color Application\n```csharp\n// Scoped text color\nusing (new ScopedTextColor(Color.FromHex(\"#e74c3c\")))\n{\n    ImGui.Text(\"Red text\");\n}\n\n// Scoped UI element color\nusing (new ScopedColor(ImGuiCol.Button, Color.FromHex(\"#2ecc71\")))\n{\n    ImGui.Button(\"Green button\");\n}\n\n// Multiple scoped colors\nusing (new ScopedColor(ImGuiCol.Button, Color.FromHex(\"#9b59b6\")))\nusing (new ScopedColor(ImGuiCol.ButtonHovered, Color.FromHex(\"#8e44ad\")))\nusing (new ScopedColor(ImGuiCol.ButtonActive, Color.FromHex(\"#71368a\")))\n{\n    ImGui.Button(\"Fully styled button\");\n}\n```\n\n### 🎯 Alignment and Layout\n\n#### Content Centering\n```csharp\n// Center text\nstring text = \"Perfectly centered!\";\nusing (new Alignment.Center(ImGui.CalcTextSize(text)))\n{\n    ImGui.Text(text);\n}\n\n// Center buttons\nusing (new Alignment.Center(new Vector2(120, 30)))\n{\n    ImGui.Button(\"Centered Button\", new Vector2(120, 30));\n}\n```\n\n#### Custom Container Alignment\n```csharp\nVector2 containerSize = new(400, 200);\nVector2 contentSize = new(100, 50);\n\n// Center content within a specific container\nusing (new Alignment.CenterWithin(contentSize, containerSize))\n{\n    ImGui.Button(\"Centered in Container\", contentSize);\n}\n```\n\n### 🔧 Advanced Styling\n\n#### Scoped Style Variables\n```csharp\n// Rounded buttons\nusing (new ScopedStyleVar(ImGuiStyleVar.FrameRounding, 8.0f))\n{\n    ImGui.Button(\"Rounded Button\");\n}\n\n// Multiple style modifications\nusing (new ScopedStyleVar(ImGuiStyleVar.FrameRounding, 12.0f))\nusing (new ScopedStyleVar(ImGuiStyleVar.FramePadding, new Vector2(20, 10)))\nusing (new ScopedStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(10, 8)))\n{\n    ImGui.Button(\"Highly Styled Button\");\n    ImGui.Button(\"Another Styled Button\");\n}\n```\n\n#### Theme-Based Styling\n```csharp\n// Use semantic colors from current theme\nusing (new ScopedThemeColor(Color.Primary))\n{\n    ImGui.Text(\"Primary theme color\");\n}\n\nusing (new ScopedThemeColor(Color.Secondary))\n{\n    ImGui.Button(\"Secondary theme button\");\n}\n```\n\n## 🎨 Available Themes\n\nImGuiStyler includes **50+ carefully crafted themes** across multiple families:\n\n### 🌙 Dark Themes\n- **Catppuccin**: Mocha, Macchiato, Frappe\n- **Tokyo Night**: Classic, Storm\n- **Gruvbox**: Dark, Dark Hard, Dark Soft\n- **Dracula**: Classic vampire theme\n- **Nord**: Arctic, frost-inspired theme\n- **Nightfox**: Carbonfox, Nightfox, Terafox\n- **OneDark**: Popular dark theme\n- **Kanagawa**: Wave, Dragon variants\n- **Everforest**: Dark, Dark Hard, Dark Soft\n\n### ☀️ Light Themes\n- **Catppuccin**: Latte\n- **Tokyo Night**: Day\n- **Gruvbox**: Light, Light Hard, Light Soft\n- **Nord**: Light variant\n- **Nightfox**: Dawnfox, Dayfox\n- **PaperColor**: Light\n- **Everforest**: Light, Light Hard, Light Soft\n- **VSCode**: Light theme\n\n### 🎨 Specialty Themes\n- **Monokai**: Classic editor theme\n- **Nightfly**: Smooth dark theme\n- **VSCode**: Dark theme recreation\n\n## 🛠️ API Reference\n\n### Theme Class\n- `Theme.Apply(string themeName)` - Apply a global theme\n- `Theme.Apply(ISemanticTheme theme)` - Apply a semantic theme\n- `Theme.Reset()` - Reset to default ImGui theme\n- `Theme.ShowThemeSelector(string title)` - Show theme browser modal\n- `Theme.RenderThemeSelector()` - Render theme browser (returns true if theme changed)\n- `Theme.AllThemes` - Get all available themes\n- `Theme.Families` - Get all theme families\n- `Theme.CurrentThemeName` - Get current theme name\n- `Theme.IsCurrentThemeDark` - Check if current theme is dark\n\n### Color Class\n- `Color.FromHex(string hex)` - Create color from hex string\n- `Color.FromRGB(int r, int g, int b)` - Create color from RGB\n- `Color.FromRGBA(int r, int g, int b, int a)` - Create color from RGBA\n- `Color.GetOptimalTextColor(ImColor background)` - Get accessible text color\n- `Color.Lighten(ImColor color, float amount)` - Lighten color\n- `Color.Darken(ImColor color, float amount)` - Darken color\n\n### Alignment Classes\n- `new Alignment.Center(Vector2 contentSize)` - Center in available region\n- `new Alignment.CenterWithin(Vector2 contentSize, Vector2 containerSize)` - Center in container\n\n### Scoped Classes\n- `new ScopedColor(ImGuiCol col, ImColor color)` - Scoped color application\n- `new ScopedTextColor(ImColor color)` - Scoped text color\n- `new ScopedStyleVar(ImGuiStyleVar var, float value)` - Scoped style variable\n- `new ScopedTheme(string themeName)` - Scoped theme application\n- `new ScopedThemeColor(Color semanticColor)` - Scoped semantic color\n\n## 🎯 Demo Application\n\nThe included demo application showcases all features:\n\n```bash\ncd ImGuiStylerDemo\ndotnet run\n```\n\nFeatures demonstrated:\n- Interactive theme browser with live preview\n- All 50+ themes with family categorization\n- Scoped styling examples\n- Color manipulation demos\n- Alignment showcases\n- Accessibility features\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our contributing guidelines:\n\n1. **Fork** the repository\n2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)\n3. **Commit** your changes (`git commit -m 'Add amazing feature'`)\n4. **Push** to the branch (`git push origin feature/amazing-feature`)\n5. **Open** a Pull Request\n\n### Development Setup\n```bash\ngit clone https://github.com/ktsu-dev/ImGuiStyler.git\ncd ImGuiStyler\ndotnet restore\ndotnet build\n```\n\n## 📄 License\n\nThis project is licensed under the **MIT License** - see the [LICENSE.md](LICENSE.md) file for details.\n\n## 🙏 Acknowledgments\n\n- **[ImGui.NET](https://github.com/mellinoe/ImGui.NET)** - .NET bindings for Dear ImGui\n- **[Hexa.NET.ImGui](https://github.com/HexaEngine/Hexa.NET.ImGui)** - Modern ImGui bindings\n- **Theme Inspirations**: Catppuccin, Tokyo Night, Gruvbox, and other amazing color schemes\n- **Community Contributors** - Thank you for your themes, bug reports, and improvements!\n\n## 🔗 Related Projects\n\n- **[ktsu.ThemeProvider](https://github.com/ktsu-dev/ThemeProvider)** - Semantic theming foundation\n- **[ktsu.ImGuiPopups](https://github.com/ktsu-dev/ImGuiPopups)** - Modal and popup utilities\n- **[ktsu.Extensions](https://github.com/ktsu-dev/Extensions)** - Utility extensions\n\n---\n\n**Made with ❤️ by the ktsu.dev team**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsu-dev%2Fimguistyler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktsu-dev%2Fimguistyler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsu-dev%2Fimguistyler/lists"}