All Projects → Soft → Xcolor

Soft / Xcolor

Licence: mit
Lightweight color picker for X11

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Xcolor

colr pickr
Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.
Stars: ✭ 27 (-87.08%)
Mutual labels:  lightweight, color, color-picker
Colorwanted
Screen color picker for Windows (Windows 上的屏幕取色器)
Stars: ✭ 105 (-49.76%)
Mutual labels:  color, color-picker
Bootstrap Colorpicker
Bootstrap Colorpicker is a modular color picker plugin for Bootstrap.
Stars: ✭ 1,351 (+546.41%)
Mutual labels:  color, color-picker
Box Cli Maker
Make Highly Customized Boxes for your CLI
Stars: ✭ 115 (-44.98%)
Mutual labels:  cli, color
Xa
Beautiful & Customizable logger ❤️
Stars: ✭ 78 (-62.68%)
Mutual labels:  cli, color
Torchlambda
Lightweight tool to deploy PyTorch models to AWS Lambda
Stars: ✭ 83 (-60.29%)
Mutual labels:  cli, lightweight
Zoya
Truly highly composable logging utility
Stars: ✭ 116 (-44.5%)
Mutual labels:  cli, color
Swiftline
Swiftline is a set of tools to help you create command line applications.
Stars: ✭ 1,156 (+453.11%)
Mutual labels:  cli, color
Colorbook
🎨 Color schemes for UI design - Optimized for foreground, background, border, etc. https://liyasthomas.github.io/colorbook
Stars: ✭ 148 (-29.19%)
Mutual labels:  color, color-picker
Swiftcolorgen
A tool that generate code for Swift projects, designed to improve the maintainability of UIColors
Stars: ✭ 152 (-27.27%)
Mutual labels:  cli, color
React Native Color
Color components for React Native 🌈
Stars: ✭ 178 (-14.83%)
Mutual labels:  color, color-picker
Doric
Protocol oriented, type safe, scalable design system foundation swift framework for iOS.
Stars: ✭ 75 (-64.11%)
Mutual labels:  design, color
Image To Xls
A simple tool to make ascii art from an image using excel colored cells.
Stars: ✭ 75 (-64.11%)
Mutual labels:  cli, color
Colors App
🎨 A PWA for copying values from popular color palettes. Supports HEX, RGB, and HSL formats.
Stars: ✭ 90 (-56.94%)
Mutual labels:  color, color-picker
Colorpickerwpf
Simple color picker control for WPF
Stars: ✭ 71 (-66.03%)
Mutual labels:  color, color-picker
Termux Extra Packages
Stars: ✭ 110 (-47.37%)
Mutual labels:  cli, x11
Appfairy
A CLI tool to Migrate a Webflow project into a React app
Stars: ✭ 183 (-12.44%)
Mutual labels:  cli, design
Nord Konsole
An arctic, north-bluish clean and elegant Konsole color scheme.
Stars: ✭ 56 (-73.21%)
Mutual labels:  cli, color
Dctb Links
My Personal Links
Stars: ✭ 65 (-68.9%)
Mutual labels:  design, color
Pikolo
An android color picker library
Stars: ✭ 142 (-32.06%)
Mutual labels:  color, color-picker

xcolor 🌈

Build Status Latest Version GitHub release dependency status License: MIT

Lightweight color picker for X11. Use mouse to select colors visible anywhere on the screen to get their RGB representation.

Installation

Using Cargo

xcolor can be installed using cargo:

cargo install xcolor

Building and running xcolor requires xcb and Xlib libraries to be present.

To get the latest development version of xcolor, you can direct cargo to install from the git repository:

cargo install --git 'https://github.com/Soft/xcolor.git'

Installing xcolor with cargo will not install its manual page or desktop file. To also install these additional files, invoke make install in the project directory. By default, the install script will place the files under /usr/local/ hierarchy.

Arch Linux

xcolor is available in the Arch User Repository. To install xcolor from AUR:

git clone https://aur.archlinux.org/xcolor.git
cd xcolor
makepkg -isr

Usage

Simply invoke the xcolor command to select a color. The selected color will be printed to the standard output.

xcolor 0.5.0
Samuel Laurén <[email protected]>:Callum Osmotherly <[email protected]>
Lightweight color picker for X11

USAGE:
    xcolor [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --custom <FORMAT>                Custom output format
    -f, --format <NAME>                  Output format (defaults to hex) [possible values: hex, HEX, hex!, HEX!, plain,
                                         rgb]
    -P, --preview-size <PREVIEW_SIZE>    Size of preview, must be odd (defaults to 255)
    -S, --scale <SCALE>                  Scale of magnification (defaults to 8)
    -s, --selection <SELECTION>          Output to selection (defaults to clipboard) [possible values: primary,
                                         secondary, clipboard]

Saving to Selection

By default, the selected color is printed to the standard output. By specifying the -s flag, xcolor can be instructed to instead save the color to X11's selection. The selection to use can be specified as an argument. Possible selection values are clipboard (the default), primary, and secondary.

Because of the way selections work in X11, xcolor forks into background when -s mode is used. This behavior can be disabled by defining XCOLOR_FOREGROUND environment variable.

Color Preview

The -S or --scale flag controls the upscaling (or zoom) of the preview. By default it is set to 8 which indicates an 8x zoom level.

The -P or --preview-size flag controls the size of the preview in pixels. So that the preview always has a center pixel this number must be odd, if an even number is passed then it will be changed to the next odd number.

Formatting

By default, the color values will be printed in lowercase hexadecimal format. The output format can be changed using the -f NAME switch. Supported format names are listed bellow:

Format Specifier Description Example Custom Format Equivalent
hex Lowercase hexadecimal (default) #ff00ff #%{02hr}%{02hg}%{02hb}
HEX Uppercase hexadecimal #00FF00 #%{02Hr}%{02Hg}%{02Hb}
hex! Compact lowercase hexadecimal1 #fff Not expressible
HEX! Compact uppercase hexadecimal1 #F0F Not expressible
rgb Decimal RGB rgb(255, 255, 255) rgb(%{r}, %{g}, %{b})
plain Decimal with semicolon separators 0;0;0 %{r};%{g};%{b}

1: The compact form refers to CSS three-letter color codes as specified by CSS Color Module Level 3. If the color is not expressible in three-letter form, the regular six-letter form will be used.

Custom Formats

The -f switch provides quick access to some commonly used formatting options. However, if custom output formatting is desired, this can be achieved using the -c FORMAT switch. The FORMAT parameter specifies a template for the output and supports a simple template language.

FORMAT templates can contain special expansions that are written inside %{...} blocks. These blocks will be expanded into color values according to the specifiers defined inside the block. Here are some examples of valid format strings and what they might translate to:

Format String Example Output
%{r}, %{g}, %{b} 255, 0, 100
Green: %{-4g} Green: ---7
#%{02hr}%{02hg}%{02hb} #00ff00
%{016Br} 0000000000000011

Expansion blocks in format strings always contain a channel specifier (r for red, g for green, and b for blue). Additionally, they can contain an optional number format specifier (h for lowercase hexadecimal, H for uppercase hexadecimal, o for octal, B for binary, and d for decimal) and an optional padding specifier consisting of a character to use for padding and the length the string should be padded to. We can use these rules to decode the above example string:

  %{016Br}
    | |||
    | ||`- Channel (red)
    | |`-- Number format specifier (binary)
    | `--- Padding length (16)
    `----- Character to use for padding (0)

In the output, we get the contents of the red color channel formatted in binary and padded with zeroes to be sixteen characters long.

Issues

Bugs & Issues should be reported at GitHub.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].