Skip to main content

Desktop notification tool for clipboard color code detection

Project description

Color Notify

PyPI version License: MIT

A desktop notification tool that detects color codes in your clipboard and displays beautiful growl-style notifications with the detected color as background. Now includes an integrated Color Picker dialog for manual color selection!

color-notfy


color-notfy-color-dialog


Demo

โœจ Features

Clipboard Monitoring

  • ๐ŸŽจ Auto-detect color codes - Supports HEX (#FF0000, #F00) and RGB (rgb(255, 0, 0))
  • ๐Ÿ”” Growl-style notifications - Frameless, borderless, with smooth fade animations
  • ๐Ÿ“ Flexible positioning - 9 positions: left/center/right ร— up/center/down
  • ๐Ÿ‘๏ธ Adjustable transparency - Opacity from 0.0 to 1.0
  • โฑ๏ธ Configurable timeout - Auto-hide after specified time or keep visible (0 = no auto-hide)

Color Picker Dialog

  • ๐ŸŽจ Interactive color picker - Qt color dialog integration
  • ๐Ÿ“ Smart positioning - Color dialog opens next to picker (configurable: left/right/top/bottom)
  • ๐ŸŽฏ Smart focus management - Focus returns to previous window on Escape
  • โš™๏ธ Auto-hide option - Optionally close picker after color selection
  • โŒจ๏ธ Global shortcut - Ctrl+Alt+Shift+C to open from anywhere
  • ๐Ÿ’พ Auto-copy to clipboard - Selected colors automatically copied
  • ๐Ÿ” Hex input support - Manually enter hex color codes
  • โŒจ๏ธ Keyboard shortcuts - Quick access with hotkeys
  • ๐Ÿ“บ Always on top - Toggle with keyboard shortcuts
  • ๐Ÿ”„ Live clipboard detection - Auto-updates from clipboard

System Integration

  • โš™๏ธ INI configuration - All settings in .color-notify.ini or color-notify.ini
  • ๐Ÿ–ฅ๏ธ System tray integration - Background monitoring with tray menu
  • ๐Ÿ” Always on Top - Optional AOT mode
  • ๐ŸŒˆ Smart text color - Auto black/white text based on luminance
  • โธ๏ธ Pause/Resume - Toggle monitoring from tray menu
  • ๐Ÿ–ฑ๏ธ Click to dismiss - Click notification to close it

๐Ÿ“ฆ Installation

pip install color-notify

Requirements

  • Python 3.6+
  • PyQt5
  • pynput (for global hotkey support)

Note: The global hotkey Ctrl+Alt+Shift+C requires pynput. If not installed, you can still use the tray menu to access the color picker.

๐Ÿš€ Usage

Run the application

color-notify

Or run as Python module:

python -m color_notify

The application will start in the background with a system tray icon.

Clipboard Monitoring Mode

  1. Copy a color code to your clipboard:

    • #FF5733
    • #F00
    • rgb(255, 87, 51)
    • rgb(100, 200, 150)
  2. A notification will appear with the color as background!

Color Picker Mode

  1. Right-click the tray icon and select "๐ŸŽจ Color Picker"

    OR

    Press global shortcut: Ctrl+Alt+Shift+C (from anywhere!)

  2. Use the color picker dialog to:

    • Click "Choose Color" to open Qt color dialog
    • Type hex code in input field and press Enter
    • Selected color automatically copied to clipboard

Color Picker Keyboard Shortcuts

  • Ctrl+Alt+Shift+C - Open color picker (global shortcut)
  • Q or Escape - Close color picker
  • A - Enable always on top
  • Shift + A - Disable always on top
  • Enter - Set color from hex input

โš™๏ธ Configuration

Color Notify looks for configuration in:

  1. ~/.color-notify.ini (user home directory) - Recommended
  2. color-notify.ini (current directory) - Fallback

Create or edit the configuration file:

[notification]
# Position: left_up, left_center, left_down,
#           center_up, center_center, center_down,
#           right_up, right_center, right_down
position = right_center

# Transparency (0.0 - 1.0)
opacity = 0.95

# Keep notification always on top
always_on_top = True

# Auto-hide timeout in milliseconds
# 0 = no auto-hide (stays until clicked)
timeout = 3000

# Margin from screen edge in pixels
margin = 20

# Enable notification sound (not implemented yet)
sound_enabled = False

[color_picker]
# Position of Qt Color Dialog relative to Color Picker
# Options: left, right, top, bottom
color_dialog_position = right

# Auto-hide Color Picker after selecting a color
# True = Closes picker and returns to previous window
# False = Keeps picker open for multiple picks (default)
auto_hide_after_pick = False

[detection]
# Detect HEX format (#FF0000, #F00)
detect_hex = True

# Detect RGB format (rgb(255, 0, 0))
detect_rgb = True

# Detect HSL format (not implemented yet)
detect_hsl = False

# Clipboard polling interval in milliseconds
# Lower = more responsive but may cause clipboard conflicts on Windows
# Recommended: 1000-2000ms for Windows, 500-1000ms for Linux/macOS
poll_interval = 1000

Note for Windows Users: If you see clipboard warning messages, increase poll_interval to 1500-2000ms in the config file. This prevents conflicts with other clipboard applications.

Quick Config Access

Right-click the tray icon and select "Open Config File" to edit settings.

๐ŸŽฏ System Tray Menu

  • ๐ŸŽจ Color Picker (Ctrl+Alt+Shift+C) - Open color picker dialog
  • ๐Ÿงช Test Notification - Display a random color notification
  • โธ๏ธ Pause/Resume Monitoring - Toggle clipboard monitoring
  • ๐Ÿ”„ Reload Config - Reload configuration without restart
  • โš™๏ธ Open Config File - Open config file in default editor
  • โ„น๏ธ About - Show application information
  • โŒ Exit - Close the application

๐Ÿ“ธ What You'll See

Notifications Display:

  • Title: Color type and code (HEX/RGB)
  • Body:
    • RGB values
    • Brightness classification (LIGHT/DARK)
    • Luminance value and visual bar
  • Background: The detected color
  • Text: Auto-adjusted (black/white) for readability

Color Picker Shows:

  • Color Preview - Large preview box with current color
  • Color Name - Hex code display
  • Choose Color Button - Opens Qt color dialog
  • Set Color Button - Apply hex from input field
  • Hex Input - Manual hex code entry

Color Notify - Complete Features Overview

๐ŸŽฏ Two Operating Modes

1. Passive Mode - Clipboard Monitoring

Automatically detects and displays colors from clipboard.

How it works:

  • Monitors clipboard continuously
  • Detects color codes automatically
  • Shows growl-style notification
  • No user interaction needed

Supported formats:

  • HEX: #FF0000, #F00
  • RGB: rgb(255, 0, 0)

2. Active Mode - Color Picker

Interactive dialog for manual color selection.

How it works:

  • Open from system tray
  • Pick colors interactively
  • Auto-copy to clipboard
  • Full dialog interface

Features:

  • Qt color dialog integration
  • Manual hex input
  • Live clipboard detection
  • Always on top option

๐Ÿ“‹ Complete Feature List

Clipboard Monitoring Features

Feature Description Config
HEX Detection Detects #RRGGBB and #RGB detect_hex = True
RGB Detection Detects rgb(r, g, b) detect_rgb = True
Auto Notification Shows notification on detect Automatic
Smart Text Color Black/white based on luminance Automatic
Luminance Display Shows brightness info Automatic
RGB Values Displays RGB breakdown Automatic
Visual Bar Luminance visualization Automatic

Notification Features

Feature Description Config
Positioning 9 screen positions position = right_center
Transparency Adjustable opacity opacity = 0.95
Timeout Auto-hide duration timeout = 3000
Always on Top Keep above windows always_on_top = True
Click to Dismiss Close on click Built-in
Fade Animation Smooth in/out Built-in
Frameless No window border Built-in
No Taskbar System tray only Built-in

Color Picker Features

Feature Description Shortcut
Qt Color Dialog Full color picker -
Hex Input Manual entry Enter
Color Preview Large preview box -
Color Name Hex display -
Auto Copy To clipboard Automatic
Clipboard Detect Auto update Every 1s
Always on Top Toggle mode A / Shift+A
Close Exit dialog Q / Escape
Multi-Monitor Screen detection Automatic
Auto Center Window positioning Automatic

System Tray Features

Feature Description
Tray Icon Minimized operation
Color Picker Menu Open picker dialog
Test Notification Sample display
Pause/Resume Toggle monitoring
Reload Config Hot reload settings
Open Config Edit INI file
About Version info
Exit Close application

Configuration Features

Feature Description Default
Position 9 positions available right_center
Opacity 0.0 to 1.0 0.95
Timeout 0 to โˆž ms 3000
Margin Screen edge margin 20 px
Poll Interval Clipboard check rate 1000 ms
AOT Always on top True
HEX Detect Enable hex detection True
RGB Detect Enable RGB detection True

Error Handling Features

Feature Description
Clipboard Errors Silent retry on access error
Auto Interval Adjust Increase on persistent errors
Error Counter Track clipboard issues
Validation RGB range checking (0-255)
Graceful Degradation Continue on errors

๐ŸŽจ Color Format Support

Currently Supported

HEX Formats

  • 6-digit: #FF5733 (red, green, blue)
  • 3-digit: #F00 (expands to #FF0000)
  • Case insensitive: #ff5733 = #FF5733

RGB Formats

  • Standard: rgb(255, 87, 51)
  • Spaces: rgb( 255 , 87 , 51 )
  • Case insensitive: RGB(255,87,51)
  • Validated: 0-255 range checking

Planned Support

  • HSL: hsl(9, 100%, 60%)
  • HSLA: hsla(9, 100%, 60%, 1.0)
  • RGBA: rgba(255, 87, 51, 1.0)
  • Named colors: red, blue, etc.
  • CSS color keywords

๐ŸŽฏ Position Options

All 9 screen positions available:

left_up      center_up      right_up
left_center  center_center  right_center
left_down    center_down    right_down

Each respects margin setting for distance from screen edge.

โฑ๏ธ Timeout Behavior

Value Behavior
0 No auto-hide (click to dismiss)
1000 1 second
3000 3 seconds (default)
5000 5 seconds
Any positive Custom milliseconds

๐ŸŽจ Smart Features

Luminance-Based Text Color

  • Light colors (luminance > 0.5): Black text
  • Dark colors (luminance โ‰ค 0.5): White text
  • Ensures readability on any background

Luminance Calculation

luminance = (0.299 ร— R + 0.587 ร— G + 0.114 ร— B) / 255

Visual Luminance Bar

  • 20-character bar: โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
  • Length based on luminance value
  • Quick visual brightness indicator

๐Ÿ”„ Workflow Integration

Design Workflow

Design Tool โ†’ Copy Color โ†’ Notification โ†’ Verify
     โ†“
Color Picker โ†’ Choose โ†’ Auto Copy โ†’ Paste

Development Workflow

Code โ†’ Copy Color โ†’ Notification โ†’ Check
    โ†“
Color Picker โ†’ Test โ†’ Copy โ†’ Implement

Testing Workflow

Spec โ†’ Color Picker โ†’ Choose โ†’ Compare โ†’ Verify
         โ†“
  Notification confirms copied colors

๐Ÿš€ Performance

Resource Usage

  • Memory: ~50-100 MB
  • CPU: <1% idle, <5% active
  • Startup: <2 seconds

Optimization

  • Efficient clipboard polling
  • Error-based interval adjustment
  • Minimal background operations
  • No unnecessary rendering

๐Ÿ”’ Security & Privacy

What We Access

  • โœ… System clipboard (text only)
  • โœ… System tray
  • โœ… Config file (local)

What We Don't

  • โŒ No network access
  • โŒ No file scanning
  • โŒ No data collection
  • โŒ No telemetry

Data Storage

  • Config file only (~/.color-notify.ini)
  • No color history saved
  • No tracking or analytics
  • Fully local operation

๐ŸŽฏ Use Case Matrix

Use Case Clipboard Mode Color Picker Both
Verify copied colors โœ… โŒ โœ…
Pick new colors โŒ โœ… โœ…
Build palette โŒ โœ… โœ…
Test hex codes โœ… โœ… โœ…
Monitor workflow โœ… โŒ โœ…
Active selection โŒ โœ… โœ…
Background checking โœ… โŒ โœ…

๐Ÿ’ก Best Practices

For Designers

  1. Keep Color Picker open while designing
  2. Use Always on Top (A key)
  3. Enable notifications for verification
  4. Set timeout to 5000 for longer viewing

For Developers

  1. Use notifications to verify copied colors
  2. Quick color picker for testing
  3. Set poll interval to 1000 for responsiveness
  4. Position notifications away from editor

For QA/Testing

  1. Use both modes for comprehensive checks
  2. Color Picker for spec comparison
  3. Notifications for automated checks
  4. Save screenshots with notifications

๐Ÿ”ฎ Future Enhancements

Planned Features

  • HSL/HSV format support
  • Color history log
  • Palette management
  • Gradient picker
  • Color harmonies
  • Contrast checker
  • Export to formats (CSS, JSON, etc.)
  • Multiple color detection in single clipboard
  • Notification templates
  • Sound notifications
  • Statistics tracking

Community Requests

Submit feature requests on GitHub Issues

๐Ÿ“Š Feature Comparison

vs Manual Copy-Paste

Color Notify Manual
Speed Instant Slow
Verification Visual Mental
History Session None
Errors Validated Possible

vs Browser Extensions

Color Notify Extensions
System-wide โœ… โŒ
No browser โœ… โŒ
Privacy โœ… โš ๏ธ
Lightweight โœ… โš ๏ธ

vs Color Picker Apps

Color Notify Other Apps
Notifications โœ… โŒ
Auto-detect โœ… โŒ
Lightweight โœ… โš ๏ธ
Free โœ… โš ๏ธ

๐Ÿ”ง Examples

HEX Colors

#FF0000  โ†’ Red
#00FF00  โ†’ Green
#0000FF  โ†’ Blue
#FFFF00  โ†’ Yellow
#FF00FF  โ†’ Magenta
#00FFFF  โ†’ Cyan
#F0A500  โ†’ Orange
#9B59B6  โ†’ Purple

RGB Colors

rgb(255, 0, 0)      โ†’ Red
rgb(0, 255, 0)      โ†’ Green
rgb(100, 150, 200)  โ†’ Light Blue
rgb(255, 87, 51)    โ†’ Coral

Short HEX

#F00  โ†’ Red (#FF0000)
#0F0  โ†’ Green (#00FF00)
#00F  โ†’ Blue (#0000FF)

๐Ÿ’ก Use Cases

For Designers

  • Quick color reference from design files
  • Pick colors interactively with color picker
  • Verify colors from screenshots
  • Check accessibility (luminance display)
  • Build color palettes

For Developers

  • Monitor colors from code
  • Verify hex/rgb conversions
  • Quick color validation
  • Copy colors to clipboard instantly
  • Test color combinations

For QA/Testing

  • Verify UI colors match specs
  • Document color usage
  • Cross-reference design systems
  • Quick color comparisons

๐Ÿ› ๏ธ Development

Requirements

  • Python 3.6+
  • PyQt5

Troubleshooting

Clipboard warnings on Windows?

Color Picker not showing?

  • Check system tray menu is accessible
  • Try running from command line to see errors

For more help, check:

Local Development

# Clone repository
git clone https://github.com/cumulus13/color-notify.git
cd color-notify

# Install in development mode
pip install -e .

# Run
python -m color_notify

๐ŸŽจ Two Modes of Operation

1. Passive Mode (Default)

  • Monitors clipboard automatically
  • Shows notifications when colors detected
  • Runs in background

2. Active Mode (Color Picker)

  • Manual color selection
  • Interactive color dialog
  • Instant clipboard copy
  • Always accessible from tray menu

Both modes work together seamlessly!

๐Ÿ“ License

MIT License - see LICENSE file for details

๐Ÿ‘ค Author

Hadi Cahyadi

Buy Me a Coffee

Donate via Ko-fi

Support me on Patreon

๐Ÿ”— Links

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

โญ Show Your Support

Give a โญ๏ธ if this project helped you!

๐Ÿ“Š Changelog

Version 1.0.1

  • โœจ Added Color Picker Dialog
  • ๐ŸŽจ Interactive color selection
  • โŒจ๏ธ Keyboard shortcuts for color picker
  • ๐Ÿ”„ Live clipboard detection in picker
  • ๐Ÿ› Fixed clipboard access warnings on Windows
  • ๐Ÿ“ˆ Improved error handling
  • ๐Ÿ“ Better documentation

Version 1.0.0

  • ๐ŸŽ‰ Initial release
  • ๐ŸŽจ HEX and RGB color detection
  • ๐Ÿ”” Growl-style notifications
  • ๐Ÿ–ฅ๏ธ System tray integration
  • โš™๏ธ Configurable positioning and timeout
  • โธ๏ธ Pause/Resume monitoring
  • ๐Ÿ–ฑ๏ธ Click to dismiss notifications

Enjoy Color Notify! ๐ŸŽจโœจ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

color_notify-1.0.10.tar.gz (162.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

color_notify-1.0.10-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file color_notify-1.0.10.tar.gz.

File metadata

  • Download URL: color_notify-1.0.10.tar.gz
  • Upload date:
  • Size: 162.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for color_notify-1.0.10.tar.gz
Algorithm Hash digest
SHA256 3001b642e46fdfb59fc4a901620fbeaf976f94f22eef09446e36896ec717e946
MD5 2340c2047342cddba13b7b808400b470
BLAKE2b-256 428266b71f0bc723aab4b443097e79a8440fbfd31246aa4f5c7bfe25f7195a67

See more details on using hashes here.

File details

Details for the file color_notify-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: color_notify-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for color_notify-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b8cd5de242329104f96eeea7339ae69f55975278acabded223bbe0c76c29da0d
MD5 5a5c20b5f59487252a3a1a9449248c09
BLAKE2b-256 931cfddf912feaf814324fa8c2e07f8a799b5ee082414108ff26e14693f35965

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page