Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wonkas Color Picker

A powerful GNOME Shell extension that picks colors from anywhere on your screen. Monitor clipboard for color codes or hover your mouse over any pixel to see its color in real-time!

Features

  • Live Pixel Color Picker: Hover your mouse over any pixel to see its color (X11 only)
  • Clipboard Monitoring: Automatically detects when you copy color codes
  • Multiple Color Formats:
    • Hex: #RGB, #RRGGBB, #RRGGBBAA
    • RGB: rgb(r, g, b), rgba(r, g, b, a)
    • HSL: hsl(h, s%, l%), hsla(h, s%, l%, a)
  • Beautiful Status Bar Display: Rainbow gradient swatch when idle, shows actual color when detected
  • Color Code Label: Displays the color code right in your status bar
  • Click to Copy: Click the menu item to copy any color format to clipboard
  • 100% Local: No external APIs, no network requests, no data collection
  • Lightweight: Minimal resource usage with smart polling intervals

System Requirements

  • Pop!_OS or any GNOME-based desktop environment
  • GNOME Shell 42+ (tested on 42.9)
  • X11 session (for pixel color picker feature - clipboard monitoring works on Wayland)

Installation

  1. Navigate to the project directory:

    cd ~/color-monitor
  2. Run the install script:

    ./install.sh
  3. Restart GNOME Shell (REQUIRED for the extension to be discovered):

    • X11: Press Alt+F2, type r, press Enter
    • Wayland: Log out and log back in
  4. Enable the extension:

    gnome-extensions enable wonka-color-picker@local

The color picker will now appear in your status bar (top-right area) with a rainbow gradient swatch.

Usage

Pixel Color Picker (Hover Mode)

  • Simply move your mouse over any pixel on your screen
  • The status bar will show the color in real-time
  • The color code updates as you move your mouse
  • Works on X11 sessions only

Clipboard Monitoring

  1. Copy any color code to your clipboard:
    • Select and copy text containing a color (e.g., #FF5733)
    • The color swatch and label will update automatically
  2. Clipboard colors take priority over hover mode
  3. Click the color swatch to open the menu
  4. Click the color code to copy it again

Menu Features

  • Color Code Display: Shows the detected color with format type
  • Click to Copy: Click the color code to copy it to clipboard
  • RGB Alternative: For hex/hsl colors, shows RGB equivalent that you can also copy

Examples

Try these:

  • Hover: Move your mouse over any UI element to see its color
  • Copy these color codes:
    • #FF5733 (hex)
    • #abc (short hex)
    • rgb(255, 87, 51) (rgb)
    • rgba(255, 87, 51, 0.5) (rgba with transparency)
    • hsl(9, 100%, 60%) (hsl)

Uninstallation

cd ~/color-monitor
./uninstall.sh

Then restart GNOME Shell as described in installation step 3.

Troubleshooting

Extension not appearing in status bar

  1. Make sure GNOME Shell was restarted after installation
  2. Verify extension is enabled:
    gnome-extensions info wonka-color-picker@local
  3. Check logs:
    journalctl -b | grep -i "wonka"

Pixel picker not working

  • Make sure you're running X11 (not Wayland)
  • Check session type: echo $XDG_SESSION_TYPE
  • Clipboard monitoring will still work on Wayland

Colors not detecting from clipboard

  • Make sure you're copying the full color code
  • Check that the color format is supported
  • Try copying a simple hex code like #FF0000 to test

Project Structure

~/color-monitor/
├── README.md                 # This file
├── install.sh                # Installation script
├── uninstall.sh              # Uninstallation script
└── extension/
    ├── extension.js          # Main extension code
    ├── metadata.json         # Extension metadata
    └── stylesheet.css        # UI styling

Technical Details

  • Language: JavaScript (GNOME Shell extensions API)
  • Clipboard polling: 500ms interval
  • Pixel picker polling: 200ms interval (only when no clipboard color)
  • Color detection: Regex-based parsing for clipboard, Gdk.pixbuf for pixels
  • UI framework: St (Shell Toolkit), GObject
  • Auto-start: Yes, when enabled
  • Resource usage: Minimal (two interval timers with smart prioritization)

How It Works

Clipboard Monitoring

  • Polls clipboard every 500ms for new text
  • Parses text using regex patterns for color codes
  • Updates display when valid color is detected

Pixel Color Picker

  • Uses Gdk.pixbuf to capture a 1x1 pixel at cursor position
  • Polls every 200ms when no clipboard color is active
  • Automatically pauses when clipboard color is detected
  • Converts pixel RGB values to hex format

Privacy & Performance

This extension:

  • Runs entirely locally on your machine
  • Does not send any data over the network
  • Does not store clipboard history or pixel data
  • Does not persist any data to disk
  • Uses efficient polling with smart prioritization
  • Minimal CPU usage (< 1% on modern systems)

License

Free for personal use.

Author

Created for Wonka by Claude Code

Repository

https://github.com/WonkaRed/WonkasColorPicker

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages