Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计通过

syncfusion-winforms-color-pickerSynfusion Winforms 颜色选择器

Agent Skill

syncfusion-winforms-color-picker 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

710

周安装

29

GitHub Stars

公开资料未说明

下载量

230
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-winforms-color-picker(Synfusion Winforms 颜色选择器)
来源仓库:https://github.com/syncfusion/winforms-ui-components-skills
仓库路径:skills/syncfusion-winforms-color-picker
安装命令:
npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-color-picker
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-color-picker

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态进行信息梳理。
  • 通过 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围,避免触发不必要的网络或文件操作。
  • 适用于团队协作与代码变更管理。

SKILL.md

Implementing Color Picker (ColorPickerUIAdv)

Guide for implementing the Syncfusion ColorPickerUIAdv control in Windows Forms applications.

Overview

The ColorPickerUIAdv control provides a Microsoft Word 2007-style color selection interface for Windows Forms applications. It offers organized color groups (Recent, Standard, Theme), customizable color palettes, multiple visual styles, and an optional "More Colors" dialog for advanced color selection.

Key Features:

  • Color Groups: Recent Colors, Standard Colors, Theme Colors
  • Custom Groups: Add user-defined color collections
  • Visual Styles: Office2007, Office2010, Office2016, Metro
  • Color Dialog: "More Colors" button for advanced selection
  • Sub-Items: Color variations and tints
  • Events: Picked (on selection), ItemSelection (on hover)
  • Automatic Color: Configurable default color button
  • Runtime Selection: Dynamic color addition via dialog

When to Use This Skill

Use this skill when you need to:

  • Implement color selection in Windows Forms applications
  • Provide Microsoft Word-style color picker interface
  • Organize colors into groups (Recent, Standard, Theme, Custom)
  • Allow users to select from predefined color palettes
  • Support theme-based color selection
  • Add color input controls with Office styling
  • Implement "More Colors" dialog for advanced selection
  • Handle color selection events in desktop applications
  • Create custom color collections for specific domains

Component Features Summary

FeatureDescription
Color GroupsRecent, Standard, Theme, and Custom groups
Sub-ItemsColor variations/tints for each base color
Visual StylesOffice2007, Office2010, Office2016, Metro
EventsPicked (selection), ItemSelection (hover)
Dialog"More Colors" option for advanced selection
CustomizationItem sizing, spacing, headers, borders
RuntimeDynamic color addition via dialog
ThemesOffice color schemes (Blue, Silver, Black)

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md When you need:

  • Assembly dependencies and NuGet packages
  • Adding ColorPickerUIAdv via designer or code
  • Namespace imports (Syncfusion.Windows.Forms.Tools)
  • Basic color selection with SelectedColor property
  • Initial setup and configuration
  • Minimal working example

Color Groups and Organization

📄 Read: references/color-groups.md When you need:

  • Understanding default groups (Recent, Standard, Theme)
  • Creating custom color groups with CustomGroups property
  • Adding color items and sub-items to groups
  • Using GroupColorItem and ColorItem classes
  • Configuring IsSubItemsVisible and SubItemsDepth
  • Setting group names and header heights
  • Organizing colors by category or theme

Appearance and Styling

📄 Read: references/appearance-styling.md When you need:

  • Applying visual styles (Office2007, Office2010, Office2016, Metro)
  • Configuring Office2007 color schemes (Blue, Silver, Black)
  • Using custom colors with Managed theme
  • ApplyManagedColors method for app-wide theming
  • Border styles (Fixed3D, FixedSingle, None)
  • BorderStyle and BorderOffset properties
  • UseOffice2007Style property configuration

Events and Runtime Selection

📄 Read: references/events-selection.md When you need:

  • Handling Picked event when color is selected
  • Using ItemSelection event for hover interactions
  • ColorPickedEventArgs and event properties
  • Runtime color selection dialog ("More Colors")
  • Configuring AutomaticColor property
  • ButtonHeight for automatic button sizing
  • Event-driven color handling patterns

Customization and Layout

📄 Read: references/customization.md When you need:

  • Color item sizing with ColorItemSize property
  • Horizontal and vertical spacing between items
  • HorizontalItemsSpacing and VerticalItemsSpacing
  • Header text alignment with TextAlignment
  • Font customization for group headers
  • Design-time color editing in property grid
  • Advanced layout and spacing options

Quick Start

Basic ColorPickerUIAdv Implementation

using System;
using System.Drawing;
using System.Windows.Forms;
using Syncfusion.Windows.Forms.Tools;

public partial class ColorPickerForm : Form
{
    private ColorPickerUIAdv colorPickerUIAdv1;

    public ColorPickerForm()
    {
        InitializeComponent();

        // Create ColorPickerUIAdv
        colorPickerUIAdv1 = new ColorPickerUIAdv();
        colorPickerUIAdv1.Size = new Size(200, 180);
        colorPickerUIAdv1.Location = new Point(20, 20);

        // Set initial selected color
        colorPickerUIAdv1.SelectedColor = Color.Blue;

        // Apply Office2016 style
        colorPickerUIAdv1.Style = ColorPickerUIAdv.visualstyle.Office2016Colorful;

        // Handle color selection
        colorPickerUIAdv1.Picked += ColorPickerUIAdv1_Picked;

        // Add to form
        this.Controls.Add(colorPickerUIAdv1);
    }

    private void ColorPickerUIAdv1_Picked(object sender,
                                          ColorPickerUIAdv.ColorPickedEventArgs args)
    {
        // Update form background with selected color
        this.BackColor = args.Color;
        MessageBox.Show($"Selected Color: {args.Color.Name}");
    }
}

Assembly Requirements

Required Assemblies:

  • Syncfusion.Grid.Base
  • Syncfusion.Grid.Windows
  • Syncfusion.Shared.Base
  • Syncfusion.Shared.Windows
  • Syncfusion.Tools.Base
  • Syncfusion.Tools.Windows

NuGet Package:

Install-Package Syncfusion.Tools.Windows

Common Patterns

Pattern 1: Color Selection with Event Handler

// Setup
private void SetupColorPicker()
{
    colorPickerUIAdv1.SelectedColor = Color.White;
    colorPickerUIAdv1.Picked += OnColorPicked;
}

// Event handler
private void OnColorPicked(object sender, ColorPickerUIAdv.ColorPickedEventArgs e)
{
    // Apply color to target control
    targetLabel.ForeColor = e.Color;

    // Or update drawing operations
    currentBrush = new SolidBrush(e.Color);
    canvas.Invalidate();
}

Pattern 2: Applying Office2016 Theme

// Office2016 Colorful style
colorPickerUIAdv1.Style = ColorPickerUIAdv.visualstyle.Office2016Colorful;

// Or Office2016 White
colorPickerUIAdv1.Style = ColorPickerUIAdv.visualstyle.Office2016White;

// Or Office2016 Black
colorPickerUIAdv1.Style = ColorPickerUIAdv.visualstyle.Office2016Black;

// Or Office2016 DarkGray
colorPickerUIAdv1.Style = ColorPickerUIAdv.visualstyle.Office2016DarkGray;

Pattern 3: Creating Custom Color Group

// Create custom color group
ColorUIAdvGroup customGroup = new ColorUIAdvGroup();
customGroup.Name = "Brand Colors";
customGroup.HeaderHeight = 25;

// Create color items
GroupColorItem primaryColor = new GroupColorItem(customGroup, Color.FromArgb(0, 120, 215));
primaryColor.Index = 0;

// Add tint variations as sub-items
primaryColor.SubItems.Add(new ColorItem(primaryColor, Color.FromArgb(204, 228, 247)));
primaryColor.SubItems.Add(new ColorItem(primaryColor, Color.FromArgb(153, 204, 239)));
primaryColor.SubItems.Add(new ColorItem(primaryColor, Color.FromArgb(102, 163, 224)));

// Add to group and control
customGroup.Items.Add(primaryColor);
customGroup.SubItemsDepth = 1;
customGroup.IsSubItemsVisible = true;

colorPickerUIAdv1.CustomGroups.Add(customGroup);

Pattern 4: Office2007 Theme with Custom Colors

// Set Managed theme
colorPickerUIAdv1.UseOffice2007Style = true;
colorPickerUIAdv1.Office2007Theme = Office2007Theme.Managed;

// Apply custom color scheme
Office2007Colors.ApplyManagedColors(this, Color.Teal);

Pattern 5: Hover Preview with ItemSelection Event

// Setup hover event
colorPickerUIAdv1.ItemSelection += ColorPickerUIAdv1_ItemSelection;

// Event handler for hover preview
private void ColorPickerUIAdv1_ItemSelection(object sender,
                                              ColorPickerUIAdv.ColorPickedEventArgs e)
{
    // Show preview without committing
    previewPanel.BackColor = e.Color;
    statusLabel.Text = $"Preview: {e.Color.Name} (RGB: {e.Color.R}, {e.Color.G}, {e.Color.B})";
}

Pattern 6: Configuring Automatic Color Button

// Set automatic color (shown when "Automatic" button is clicked)
colorPickerUIAdv1.AutomaticColor = Color.Black;

// Adjust button height
colorPickerUIAdv1.ButtonHeight = 30;

Key Properties

Color Selection

  • SelectedColor - Gets/sets the currently selected color
  • SelectedItem - Gets the selected color item object
  • AutomaticColor - Default color for "Automatic" button

Color Groups

  • RecentGroup - Recent colors collection
  • StandardGroup - Standard colors collection
  • ThemeGroup - Theme colors collection
  • CustomGroups - User-defined color groups collection

Visual Style

  • Style - Visual style (Default, Office2007, Office2010, Office2016*, Metro)
  • UseOffice2007Style - Enable/disable Office2007 styling
  • Office2007Theme - Office2007 color scheme (Blue, Silver, Black, Managed)

Layout and Appearance

  • ColorItemSize - Size of individual color items (default: 13x13)
  • HorizontalItemsSpacing - Horizontal space between items (default: 4)
  • VerticalItemsSpacing - Vertical space between items (default: 0)
  • BorderStyle - Border appearance (None, FixedSingle, Fixed3D)
  • BorderOffset - Border height (default: 3)
  • TextAlign - Header text alignment (default: MiddleLeft)
  • ButtonHeight - Height of automatic button (default: 23)

Events

  • Picked - Raised when a color is selected
  • ItemSelection - Raised when mouse hovers over a color item

Common Use Cases

Use Case 1: Text Editor Color Selection

Implement color picker for changing text or background colors in a text editor.

private void SetupTextColorPicker()
{
    textColorPicker.Style = ColorPickerUIAdv.visualstyle.Office2016Colorful;
    textColorPicker.SelectedColor = richTextBox.SelectionColor;
    textColorPicker.Picked += (s, e) => richTextBox.SelectionColor = e.Color;
}

Use Case 2: Drawing Application Color Palette

Provide color selection for drawing tools with preview on hover.

private void SetupDrawingColorPicker()
{
    colorPicker.Style = ColorPickerUIAdv.visualstyle.Office2016Black;
    colorPicker.ItemSelection += (s, e) => ShowColorPreview(e.Color);
    colorPicker.Picked += (s, e) => SetActiveBrushColor(e.Color);
}

Use Case 3: Theme Color Customization

Allow users to customize application theme colors with organized groups.

private void SetupThemeColorPicker()
{
    // Add custom theme colors group
    ColorUIAdvGroup themeGroup = new ColorUIAdvGroup();
    themeGroup.Name = "Theme Colors";

    // Add primary, accent, background colors
    themeGroup.Items.Add(CreateColorItem(primaryColor, "Primary"));
    themeGroup.Items.Add(CreateColorItem(accentColor, "Accent"));
    themeGroup.Items.Add(CreateColorItem(backgroundColor, "Background"));

    colorPicker.CustomGroups.Add(themeGroup);
    colorPicker.Picked += ApplyThemeColor;
}

Use Case 4: Form Designer Property Editor

Integrate color picker for property editing in a form designer tool.

private void ShowColorPickerForProperty(Control control, string propertyName)
{
    ColorPickerUIAdv picker = new ColorPickerUIAdv();
    picker.SelectedColor = (Color)control.GetType()
                                   .GetProperty(propertyName)
                                   .GetValue(control);

    picker.Picked += (s, e) => {
        control.GetType()
               .GetProperty(propertyName)
               .SetValue(control, e.Color);
    };

    ShowPickerInPopup(picker);
}

Use Case 5: Conditional Formatting Color Selection

Provide color picker for conditional formatting rules in data grids.

private void SetupConditionalFormatColorPicker()
{
    // Create custom group with warning/info/success colors
    ColorUIAdvGroup formatGroup = new ColorUIAdvGroup();
    formatGroup.Name = "Formatting Colors";

    formatGroup.Items.Add(new GroupColorItem(formatGroup, Color.Red));      // Error
    formatGroup.Items.Add(new GroupColorItem(formatGroup, Color.Orange));   // Warning
    formatGroup.Items.Add(new GroupColorItem(formatGroup, Color.Yellow));   // Caution
    formatGroup.Items.Add(new GroupColorItem(formatGroup, Color.LightGreen)); // Success

    colorPicker.CustomGroups.Add(formatGroup);
    colorPicker.Picked += ApplyConditionalFormatting;
}

Troubleshooting

Issue: Control Not Appearing in Toolbox

Solution: Install Syncfusion.Tools.WinForms NuGet package and rebuild solution.

Issue: Colors Not Displaying Correctly

Solution: Ensure proper initialization of color groups before adding to form. Check SubItemsDepth and IsSubItemsVisible properties.

Issue: Theme Not Applying

Solution: Set UseOffice2007Style = true for Office2007 themes. For other styles, use the Style property directly.

Issue: Events Not Firing

Solution: Verify event handlers are attached after control initialization but before form load. Check that control is added to form's Controls collection.

Issue: Custom Groups Not Showing

Solution: Ensure CustomGroups.Add() is called after creating and populating the ColorUIAdvGroup. Verify HeaderHeight is set appropriately.

Next Steps

  1. Read getting-started.md for initial setup
  2. Explore color-groups.md to organize colors effectively
  3. Review appearance-styling.md for visual customization
  4. Implement event handling with events-selection.md
  5. Fine-tune layout using customization.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.96%
按下载量换算76

Claude

32.29%
按下载量换算74

Cursor

17.99%
按下载量换算41

Gemini CLI

8.42%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills