WinForms — Generate Custom SVG Skin Palettes with AI (v25.2)

17 March 2026

In our v25.2 release, we introduced a preview of our AI-powered custom SVG skin palette feature. This feature transforms how you design application color schemes. It leverages generative AI to interpret natural language instructions and create cohesive palettes that apply seamlessly across your entire WinForms application.

Note: We've shared our Generate Custom SVG Skin Palettes with AI implementation with the community to gather feedback and evaluate demand for similar features in DevExpress WPF, Blazor, and JS/DevExtreme product lines.

Generate Custom SVG Skin Palettes with AI - WinForms, DevExpress

How AI-Powered Palette Generation Works

You describe the desired palette aesthetic/style in the conversational UI with plain language. Sample prompts include: "warm autumn palette", "high-contrast accessibility theme", or your favorite sports team name. You then refine results in the chat. The system preserves conversation context for the LLM (the conversation history). AI produces a custom palette and applies it programmatically.

The generated palette includes primary background/foreground colors and accent colors for interactive elements. The palette automatically applies to all DevExpress WinForms UI controls with SVG skin support, which maintains visual consistency throughout the application.

For technical details and extension options, see the Implementation Highlights section.

Real-World Use Cases

This feature addresses common application design scenarios where custom color schemes improve user experience (UX) and business value:

Enterprise Branding - You generate palettes that align with corporate brand guidelines. You describe brand colors and style in plain language. AI creates a palette with consistent color relationships across all UI controls.

High-Contrast and Accessibility Palettes - You design palettes for users with visual impairments. DevExpress WinForms UI Library already includes built-in high-contrast skins and system high-contrast mode support. You specify accessibility requirements (such as tritanopia support). AI generates palettes that meet contrast ratio standards and preserve visual clarity.

Multi-Tenant Applications - You generate a unique visual identity for each customer. You can generate and save palettes per tenant programmatically or allow users to customize their workspace (UI) appearance. This feature also accelerates prototyping. You can generate multiple palette options in minutes and present them to stakeholders.

Seasonal or Event-based Palettes - You refresh application visuals for holidays or campaigns. For example, you can generate palettes for promotions or special events.

Try the Feature with a GitHub Demo

We implemented a complete solution that demonstrates AI-powered SVG palette generation in a Windows Forms application.

Key Features

  • Live palette preview across DevExpress UI controls
  • Instant visual updates during palette generation
  • Compare and switch between AI-generated palettes
  • Persistent palette storage in JSON format within application settings
  • Restore palettes between sessions
  • Palette management with delete support
  • Configurable AI model selection (gpt-5-mini, gpt-4o-mini, gpt-4.1)
  • Support for custom AI services and a rate-limited demo endpoint
  • Customizable AI instructions for tailored generation behavior

Open GitHub Repo

Prerequisites

  • .NET 8+ SDK
  • DevExpress WinForms v25.2+
  • Microsoft.Extensions.AI (v9.7.1)
  • Azure.AI.OpenAI (v2.2.0-beta.5)
  • An active AI service subscription (Azure OpenAI, OpenAI, or Ollama)

Note: The demo targets specific Microsoft.Extensions.AI library versions. Use exact versions to avoid compatibility issues.

Getting Started

  1. Clone the GitHub repo.
  2. Open the solution in Visual Studio or JetBrains Rider.
  3. Configure AI service credentials in ChatClientFactory.cs (or use the rate-limited demo endpoint).
  4. Build and run the DevExpress.AI.WinForms.AIGeneratePalette.Demo project.
  5. Click AI Generate Palette in the Ribbon UI to open the Color Palette Editor.

Use the following prompts to explore the feature:

- Generate a warm autumn palette with rust and gold tones
- Create a high-contrast accessibility-friendly palette for vision impaired users
- Design a modern flat pastel palette inspired by Material Design
- Build a dark mode theme with purple accents
- Make a vibrant tropical palette with coral and turquoise

The workflow completes in seconds. You describe your vision, review the result across controls, refine output with follow-up prompts (if needed), and save the palette. The generated palette is automatically applied to your WinForms application.

Generate Skin Palettes with AI - DevExpress WinForms UI Controls

Ready-to-Use Project

The DevExpress.AI.WinForms.AIGeneratePalette project is production-ready. You can add it to your solution as-is.

The project includes:

  • A palette generation dialog UI
  • AI-powered palette generation logic
  • Palette management and persistence support.

You can customize AI instructions, modify dialog layout, or extend the feature set based on your application requirements.

Under the Hood: Implementation Highlights

The example demonstrates key implementation patterns for AI integration in WinForms applications.

AI Integration and Model Flexibility

The demo application interacts with Azure OpenAI services. It integrates with Microsoft.Extensions.AI library, registers an IChatClient with the AIExtensionsContainerDesktop container, and exposes AI capabilities across the application:

IChatClient chatClient = new Azure.AI.OpenAI.AzureOpenAIClient(
    new Uri(AzureOpenAIEndpoint),
    new System.ClientModel.ApiKeyCredential(AzureOpenAIKey))
    .GetChatClient(ModelId).AsIChatClient();
    
AIExtensionsContainerDesktop.Default.RegisterChatClient(chatClient);

This implementation supports any AI provider that implements IChatClient. You can switch models without code changes. The example supports gpt-5-mini, gpt-4o-mini, and gpt-4.1.

Different LLMs may produce different palette results. We tested AI-powered Color Palette Generation primarily with OpenAI GPT models. You can also connect AI services such as Google Gemini, Anthropic Claude, or xAI Grok. We encourage you to try different models and share your feedback on the ones that work best for your specific needs.

Structured Prompt Engineering

The GeneratePaletteInstruction.md file defines precise AI instructions for palette output. These instructions enforce palette structure and color value rules. Carefully crafted instructions ensure consistent and predictable results across different prompts.

SVG Palette Manipulation

The example creates and modifies SVG palettes. You define palette colors and register the palette in the active skin. The palette becomes available to all SVG-enabled controls at runtime.

var svgPalette = new SvgPalette();
svgPalette.Colors.Add(new SvgColor("Paint", Color.FromArgb(242, 242, 242)));
svgPalette.Colors.Add(new SvgColor("Accent Paint", Color.FromArgb(23, 107, 209)));
// ... additional colors

var commonSkin = CommonSkins.GetSkin(UserLookAndFeel.Default);
commonSkin.CustomSvgPalettes.Add(
    new SvgPaletteKey(commonSkin.CustomSvgPalettes.Count, paletteName), 
    svgPalette);

Conversation State Management

Our implementation maintains the conversation history. Users can refine palettes through follow-up requests. This creates a flexible, interactive workflow in which each adjustment builds on previous decisions and maintains the integrity of the design process.

Palette Persistence and Storage

The example saves and restores custom palettes across application sessions. The AIPaletteRepository class serializes palettes to JSON and stores them in application settings. You can extend this option to any storage solution. For example, store palettes in a database for multi-user scenarios, in configuration files for deployment flexibility, or in cloud storage for cross-device access. The example provides a strong foundation for customization based on your preferences.

Share Your Feedback

This AI-powered palette generation feature is experimental, and we need your feedback to determine our next steps. Based on the response from our community, we will consider similar implementations for WPF (AI-generated resource dictionaries and theme palettes), Blazor (dynamic CSS variable values assignment), and DevExtreme.

We want to understand how this feature fits into development and end-user workflows. Please share your experience with us:


Your feedback will directly shape our future AI-powered roadmap. If you have technical questions or need assistance with the example, submit a support ticket via the DevExpress Support Center.

Additional Resources

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.