Small library for color conversion, manipulation, etc.
Project description
repacolors
Small library for color conversion, manipulation, etc.
Install
$ pip install repacolors
To get the colors from Xrdb
, install it with the xextras
extras:
$ pip install repacolors[xextras]
repacolor
command
$ repacolor --help
Usage: repacolor [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
colorwheel Display colorwheel defined by `name` or created by the colors...
display Display information about the provided colors.
palette Get colors of given palette
pick Pick colors from your desktop.
scale Display color scale defined by the colors provided via stdin.
display
Display color information in the terminal.
$ repacolor display red
+--------+ red - #ff0000
| BIG | rgb(255, 0, 0)
| RED | hsl(0, 100%, 50%)
| SQUARE | lab(53.24% 80.09 67.2)
+--------+
$ repacolor display "#ffaad5" "rgb(128, 12, 46, .8)"
... (displays both colors)
$ echo "#ffffff" | repacolor display
... (displays `white`)
pick
Executes color picker and displays the picked color.
$ repacolor pick
The integrated color picker works under X11/linux if installed with xextras. If you want to use an external color picker, set the COLORPICKER
environment variable:
$ export COLORPICKER=xcolor
$ repacolor pick
palette
Display the colors of the palette. If no palette name provided, it shows the palettes available.
$ repacolor palette
List of available palette names:
ryb, rybw3, orrd, pubu, ...
$ repacolor palette viridis
#440154
#482777
...
scale
Display a color scale defined by the input colors.
$ repacolor scale red white
[colors from red to white]
$ repacolor palette viridis | repacolor scale
[color scale defined by `viridis` colors]
colorwheel
Display a color wheel.
Pre defined color wheels:
ryb
- The RYB color wheelrgb
orhsl
- The RGB color wheellab
orlch
- CIELAB color wheel
If no color wheel name provided, it will create one from the colors provided on stdin
.
$ repacolor colorwheel rgb
[RGB color wheel]
$ repacolor scale red white black red | repacolor colorwheel
[red - white - black color wheel]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for repacolors-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfd7a773250af2002938a92c65c7db122b8abc8aada33b41dde8c156c9e37a6b |
|
MD5 | 307752c9b0d8d811e587b697b46cc685 |
|
BLAKE2b-256 | cc7b5ae1304e0ef33fb3b486f4459ea2885191fc0da577da70f98bdf1233becb |