Skip to main content

Overview

Color Picker is a system-wide utility that allows you to pick colors from anywhere on your screen and copy them in various formats. It includes color history management and supports multiple color format outputs.
Color Picker can be launched programmatically via the ColorPickerService API for integration with other applications.

Activation

1

Enable Color Picker

Open PowerToys Settings and enable Color Picker in the utilities list
2

Launch Picker

Press the activation shortcut (default: Win+Shift+C)
3

Select Color

Click anywhere on screen to pick the color at that location

Programmatic Launch

// Launch Color Picker from code
using ColorPicker.ModuleServices;

await ColorPickerService.Instance.OpenPickerAsync();
File reference: src/modules/colorPicker/ColorPicker.ModuleServices/ColorPickerService.cs:34

Key Features

Color Picking Modes

Screen Picker

Pick any color from your screenMagnified view for pixel-perfect selection

Color History

Access previously picked colorsStored in colorHistory.json

Fine-Tune Zoom

Zoom in for precise color selectionAdjustable zoom level

Multi-Format Copy

Copy color in multiple formats simultaneouslyConfigurable format list

Supported Color Formats

Color Picker supports numerous color format outputs:
  • HEX - #FF5733
  • RGB - rgb(255, 87, 51)
  • RGBA - rgba(255, 87, 51, 1.0)
  • HSL - hsl(14, 100%, 60%)
  • HSLA - hsla(14, 100%, 60%, 1.0)
  • HSV - hsv(14, 80%, 100%)

Color History

Automatic tracking of picked colors:
// Retrieve saved color history (ColorPickerService.cs:39)
public Task<OperationResult<IReadOnlyList<SavedColor>>> GetSavedColorsAsync()
{
    var historyPath = Path.Combine(
        Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
        "Microsoft", "PowerToys", "ColorPicker", "colorHistory.json"
    );
    
    // Returns list of SavedColor objects with:
    // - Hex representation
    // - ARGB values
    // - Formatted strings for all enabled formats
}
History file location:
%LOCALAPPDATA%\Microsoft\PowerToys\ColorPicker\colorHistory.json

Zoom and Precision

Enhanced color picking accuracy:
  • Magnified Viewport: Enlarged pixel view under cursor
  • Pixel Grid: Clear pixel boundaries for exact selection
  • RGB Preview: Real-time color value display
  • Mouse Wheel Zoom: Adjust magnification level dynamically

Configuration

Activation Shortcut

activation_shortcut
hotkey
default:"Win+Shift+C"
Global hotkey to launch Color PickerConfigurable modifier keys:
  • Win (Windows key)
  • Alt
  • Shift
  • Ctrl
Plus any virtual key code
// Hotkey structure (from dllmain.cpp:)
struct Hotkey {
    bool win;     // Windows key
    bool alt;     // Alt key
    bool shift;   // Shift key
    bool ctrl;    // Ctrl key
    UINT code;    // Virtual key code
};
Configuration file: PowerToys settings JSON

Color Format Selection

Choose which formats to include when copying colors:
  1. Open PowerToys Settings
  2. Navigate to Color Picker
  3. Scroll to “Color formats”
  4. Check formats to enable
  5. Reorder formats by dragging
When you pick a color, all enabled formats are copied to clipboard as multi-line text.

Editor Integration

Optional: Configure which editor opens color history:
  • Default: Internal viewer
  • Custom: Specify external color management tool

Appearance Options

show_color_name
boolean
default:"false"
Display color names (e.g., “Red”, “Midnight Blue”) alongside hex values
activation_behavior
enum
default:"openEditor"
What happens when activation shortcut is pressed:
  • openEditor - Open color picker interface
  • openColorPickerAndThenEditor - Pick color, then open editor
color_format_for_clipboard
enum
default:"hex"
Default format for quick copy operations

Use Cases

Web Development

1

Pick Brand Colors

Sample colors from design mockups or competitor websites
1. Open design in browser
2. Press Win+Shift+C
3. Click on color to sample
4. Paste into CSS: #FF5733
2

Extract Color Palettes

Build color schemes from existing designsPick multiple colors, check history, export palette
3

Accessibility Testing

Verify color contrast ratios:
  1. Pick foreground color
  2. Pick background color
  3. Calculate contrast ratio
  4. Ensure WCAG compliance

Graphic Design

Match colors across different applications:
  • Sample from reference image
  • Copy in design tool format (HSB, CMYK)
  • Paste into design software
  • Ensure exact color reproduction
Maintain consistent branding:
  1. Pick brand colors from official assets
  2. Save to color history
  3. Reference when creating new designs
  4. Copy in required format (HEX, RGB, CMYK)
Discover interesting color combinations:
  • Sample from photos or artwork
  • Build color palettes from nature
  • Experiment with color relationships
  • Document successful combinations

UI Development

// Pick color from screen: #FF5733
// Use in XAML:
<SolidColorBrush Color="#FF5733" />

// Or programmatically:
var color = Color.FromArgb(255, 87, 51);

Digital Art & Photography

Color Grading

Sample colors from reference images for consistent grading

Palette Generation

Extract color palettes from photographs for design projects

Color Theory

Study color relationships in existing artwork

Style Matching

Match colors when editing photos or creating digital art

Keyboard Shortcuts

Global

ShortcutAction
Win+Shift+COpen Color Picker (default, configurable)

During Color Picking

ShortcutAction
Left ClickPick color and copy to clipboard
EscCancel and close picker
Mouse Wheel UpIncrease zoom level
Mouse Wheel DownDecrease zoom level
Arrow KeysFine-tune cursor position (pixel by pixel)

In Color History

ShortcutAction
Click ColorCopy color to clipboard
DeleteRemove color from history
Ctrl+CCopy selected color

Technical Details

Architecture

Color Conversion Engine

Built-in conversion between color spaces:
// Format conversion (ColorPickerService.cs:66)
private static Dictionary<string, string> BuildFormats(
    Color color, 
    ColorPickerSettings settings)
{
    var formats = new Dictionary<string, string>();
    
    // Add each enabled format
    if (settings.ShowHex)
        formats["HEX"] = $"#{color.R:X2}{color.G:X2}{color.B:X2}";
    
    if (settings.ShowRgb)
        formats["RGB"] = $"rgb({color.R}, {color.G}, {color.B})";
    
    // ... additional format conversions
    
    return formats;
}

Module Integration

Color Picker implements PowerToys module interfaces:
// Module interface (from dllmain.cpp)
class ColorPickerModule : public PowertoyModuleIface
{
public:
    virtual void enable() override;
    virtual void disable() override;
    virtual bool is_enabled() override;
    
    // Hotkey handling
    virtual bool on_hotkey(DWORD hotkeyId) override;
    
    // Settings management
    virtual void set_config(const wchar_t* config) override;
};

Event Signaling

Uses Windows events for inter-process communication:
// Signal Color Picker to show (ColorPickerService.cs:90)
private static Task<OperationResult> SignalEventAsync(
    string eventName, 
    string actionDescription)
{
    using var eventHandle = new EventWaitHandle(
        false, 
        EventResetMode.AutoReset, 
        eventName
    );
    
    if (!eventHandle.Set())
        return Task.FromResult(OperationResult.Fail(
            $"Failed to signal {actionDescription}."));
    
    return Task.FromResult(OperationResult.Ok());
}
Event name: Defined in Constants.ShowColorPickerSharedEvent()

History File Format

[
  "#FF5733",
  "#3498DB",
  "#2ECC71",
  "#F39C12",
  "#9B59B6"
]
Stored as array of hex color strings, parsed to full SavedColor objects on retrieval.

Troubleshooting

Check:
  • PowerToys is running
  • Color Picker is enabled in settings
  • Hotkey is correctly configured
  • No conflicting application using same shortcut
Debug:
# Test programmatic launch
# In PowerShell with PowerToys running
[ColorPicker.ModuleServices.ColorPickerService]::Instance.OpenPickerAsync()
Possible causes:
  • Clipboard locked by another application
  • No color formats enabled in settings
  • Clipboard manager interfering
Solutions:
  1. Close clipboard managers temporarily
  2. Enable at least one color format
  3. Check Windows clipboard permissions
Verify:
  • Mouse wheel is functioning
  • Color Picker window has focus
  • Graphics drivers are up to date
Alternative: Use arrow keys for fine positioning
Check file location:
%LOCALAPPDATA%\Microsoft\PowerToys\ColorPicker\colorHistory.json
Verify:
  • Directory exists and is writable
  • File is not corrupted (valid JSON)
  • Sufficient disk space
Reset: Delete file, it will be recreated

See Also

Build docs developers (and LLMs) love