Skip to content

6z7y/colpik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImgPik - Screen Color Picker

A simple Rust-based tool that captures the color of a pixel at your cursor position and copies it to your clipboard as a HEX code.

Features

  • Cross-platform: Works on X11 and Wayland (Linux).
  • Clipboard support: Copies the color code to your clipboard.

Installation

Prerequisites

Install Rust Then, install dependencies for your display server:

For X11:

maim xdotool xclip

For Wayland:

grim slurp wl-clipboard

Install ImgPik

Clone and install the tool:

git clone https://github.com/6z7y/colpik.git
cd colpik
make install

Run it with:

colpik

Usage

  1. Run colpik.
  2. Click on the screen to select a pixel.
  3. The HEX color code (e.g., #FF0000) is printed to the terminal and copied to your clipboard.

Example:

$ colpik
#1A2B3C

Troubleshooting

Common Issues

  • "Command not found" errors:

    • Ensure dependencies are installed.
    • Verify with: maim --version (X11) or grim --version (Wayland).
  • Clipboard not working:

    • X11: Install xclip (sudo apt install xclip).
    • Wayland: Install wl-clipboard (sudo apt install wl-clipboard).
  • Color not captured:

    • Check your display server: echo $XDG_SESSION_TYPE.
    • Ensure /tmp has write permissions for /tmp/imgpik.png.

FAQ

Q: Does it work on Windows/macOS?
A: Currently supports Linux only (X11/Wayland).

Q: How do I build without make?
A: Use:

cargo build --release
./target/release/colpik

About

get hex code color from screen

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors