A lightweight WPF desktop application that enables color picking from the screen.
- Windows 11 UI theme — custom implicit styles modelled on the Windows 11 design language (rounded controls, accent blue, Segoe UI Variable typography)
- Automatic dark / light mode — reads
AppsUseLightThemefrom the Windows registry on startup and switches live whenever the user changes the system preference in Settings; the native title bar follows via the DWMDWMWA_USE_IMMERSIVE_DARK_MODEattribute - Localization — all UI strings and status messages are stored in
.resxresource files; adding a new language requires only a newStrings.<culture>.resxsatellite file (e.g.Strings.de.resxfor German) - Single-file publish — releases as a self-contained-free, single
win-x64executable
| Requirement | Version |
|---|---|
| OS | Windows 10 / 11 (x64) |
| Runtime | .NET 10 Desktop Runtime |
- Download the latest executable from the Releases page.
- Ensure the .NET 10 Desktop Runtime is installed.
- Run
ColorPicker.exe.
git clone https://github.com/TheBlueHeron/ColorPicker.git
cd ColorPicker
dotnet build ColorPicker/ColorPicker.csprojTo produce a single-file release build:
dotnet publish ColorPicker/ColorPicker.csproj -c Release- Left-click to toggle color sampling
- Right-click a cell in the sample grid to select a color
- Copy color values from the sample output fields
| File | Role |
|---|---|
Win11LightColors.xaml |
Light palette: colour tokens + named brushes |
Win11DarkColors.xaml |
Dark palette: colour tokens + named brushes |
Win11Theme.xaml |
Implicit styles for all controls; all brush references use DynamicResource |
App.xaml.cs reads the Windows registry key AppsUseLightTheme at startup and subscribes to SystemEvents.UserPreferenceChanged to swap MergedDictionaries[0] at runtime — no restart needed. The native title bar is synchronised via DwmHelper, which calls DwmSetWindowAttribute with DWMWA_USE_IMMERSIVE_DARK_MODE.
All user-facing strings are defined in Resources/Strings.resx and accessed via the strongly-typed Strings class. XAML views use {x:Static res:Strings.XYZ} bindings.
To add a new language:
- Copy
Resources/Strings.resxand rename itStrings.<culture>.resx(e.g.Strings.de.resxfor German). - Translate the
<value>elements — keep all<data name="...">keys identical. - Rebuild. .NET will automatically select the correct satellite assembly based on
Thread.CurrentThread.CurrentUICulture, which is set from the OS locale by default.
| File | Culture |
|---|---|
Strings.resx |
Neutral / English (fallback) |
Strings.nl.resx |
Dutch (nl) |
Contributions are welcome! Please open an issue first to discuss what you would like to change, then submit a pull request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
Distributed under the Unlicense License. See LICENSE for details.
