Install hyprpicker on Arch Linux
mainYou can install hyprpicker directly from the Arch Linux repositories using pacman.
sudo pacman -S hyprpickerrepository·main·Indexed 22 days ago
https://github.com/hyprwm/hyprpickerA Wayland color picker compatible with wlroots that allows users to select colors from their screen. It supports multiple output formats (CMYK, HEX, RGB, HSL, HSV), custom output templates, and automatic copying to the clipboard via wl-copy. Features include a magnifying lens for selection, configurable zoom scale and circle radius, and optional desktop notifications.
You can install hyprpicker directly from the Arch Linux repositories using pacman.
sudo pacman -S hyprpickerTo build hyprpicker manually, you must first install the following dependencies:
cmakepkg-configpangocairowaylandwayland-protocolshyprutilsxkbcommonFollow these steps to build and install the binary:
# Configure the build directory
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
# Build the project using all available CPU cores
cmake --build ./build --config Release --target hyprpicker -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
# Install the binary
cmake --install ./buildTo automatically copy the selected color to your clipboard, use the -a or --autocopy flag.
Requirement: This feature requires the wl-copy command to be installed on your system.
$ hyprpicker -aTo use hyprpicker, run the command in your terminal. Upon invocation, your cursor will transform into a magnifying lens. Click on any pixel on your screen to select its color. The selected color will be printed to standard output (stdout).
$ hyprpickerhyprpicker to pick a color, your displays will appear to "freeze" during the selection process. This is expected behavior.Hyprpicker allows you to define both the color space and the string template used for output.
--format (or -f). Supported values: cmyk, hex, rgb, hsl, hsv.--output-format (or -o). This uses a format string where {0}, {1}, {2}, and {3} correspond to the color components.Default templates based on format:
cmyk: {0}% {1}% {2}% {3}%hex: #{0}{1}{2}rgb: {0} {1} {2}hsl: {0} {1}% {2}%hsv: {0} {1}% {2}%# Example: Custom RGB output format
hyprpicker -f rgb -o "rgb({0}, {1}, {2})"Common usage patterns for hyprpicker:
Basic color pick:
$ hyprpickerGet a pixel's color in HSL, wrapped in a CSS function:
This example uses sed to transform the raw HSL output into a valid CSS hsl() string.
$ hyprpicker -f hsl | sed 's/^/hsl(/; s/$/)/; y/ /,/'The following members control the visual appearance and scaling of the color picker interface:
m_fZoomScale: A float determining the magnification level (default is 10.0).m_iCircleRadius: An integer defining the radius of the selection circle (default is 100).m_bFancyOutput: A boolean to enable/disable fancy output rendering.Use the -c or --cursor flag to include the cursor in the frozen preview during the selection process.
$ hyprpicker -cThe CHyprpicker class manages several boolean configuration flags that control the application's behavior. These flags determine how the picker interacts with the system and how it renders:
m_bAutoCopy: Automatically copy the selected color to the clipboard.m_bNotify: Send a notification when a color is picked.m_bRenderInactive: Render the picker surface even when it is not the focused window.m_bNoZoom: Disable the zoom effect.m_bNoFractional: Disable fractional scaling support.m_bDisablePreview: Disable the color preview.m_bUseLowerCase: Use lowercase for hex color codes.m_bIncludeCursor: Include the cursor position in the color selection.m_bCopyStandardColorName: Attempt to copy the standard color name along with the color value.When configuring hyprpicker, you can specify the format of the color output using the eOutputMode enumeration. The supported modes are:
OUTPUT_CMYK (0)OUTPUT_HEX (1)OUTPUT_RGB (2)OUTPUT_HSL (3)OUTPUT_HSV (4)enum eOutputMode : uint8_t {
OUTPUT_CMYK = 0,
OUTPUT_HEX,
OUTPUT_RGB,
OUTPUT_HSL,
OUTPUT_HSV,
};The following flags are available for the hyprpicker command:
| Short | Long | Description |
|---|---|---|
-a | --autocopy | Automatically copies the output to the clipboard (requires wl-clipboard) |
-f | --format=fmt | Specifies the output format (cmyk, hex, rgb, hsl, hsv) |
-o | --output-format=fmt | Specifies how the output color should be formatted (e.g. rgb({0}, {1}, {2})) |
-n | --notify | Sends a desktop notification (requires notify-send) |
-b | --no-fancy | Disables the "fancy" (colored) outputting |
-h | --help | Show this help message |
-r | --render-inactive | Render (freeze) inactive displays |
-z | --no-zoom | Disable the zoom lens |
-q | --quiet | Disable most logs (leaves errors) |
-v | --verbose | Enable more logs |
-t | --no-fractional | Disable fractional scaling support |
-d | --disable-preview | Disable live preview of color |
-c | --cursor | Include cursor in the frozen preview |
-l | --lowercase-hex | Outputs the hexcode in lowercase |
-s | --scale=scale | Set the zoom scale (between 1 and 10) |
-u | --radius=radius | Set the circle radius (between 1 and 1000) |
-N | --name | Copies the standard color name instead of the format if matched (requires -a) |
-V | --version | Print version info |