cvcolor [colorname...] ['redvalue greenvalue bluevalue'...] |
-h print this help and exit -H, --help print full documentation and exit -V, --version print version and exit
An unknown color name is matched against the color database and the any matches are reported.
With no arguments, cvcolor will accept one color name or 3 numerical rgb values per line. The rgb values must either be in the range 0..1 or in the range ..255. cvcolor responds with the corresponding (nearest) color name and the rgb, hsv, and cmyk values.
Colors are taken from /etc/X11/rgb.txt
, but colors with spaces in their names are skipped (they have capitalized duplicates without spaces).
$ cvcolor DarkOliveGreen OliveDrab '.1 .2 .3' '25 50 75' DarkOliveGreen ________0-1____________ ___0-255___ __00-ff__ RGB: 0.333 0.420 0.184 85 107 47 556b2f HSV: 82 0.561 0.420 CMYK: 0.086 0.000 0.235 0.580 OliveDrab ________0-1____________ ___0-255___ __00-ff__ RGB: 0.420 0.557 0.137 107 142 35 6b8e23 HSV: 79 0.754 0.557 CMYK: 0.137 0.000 0.420 0.443 nearest color: DarkSlateGray distance: 1.93% ________0-1____________ ___0-255___ __00-ff__ RGB: 0.100 0.200 0.300 26 51 77 1a334d HSV: 210 0.667 0.300 CMYK: 0.200 0.100 0.000 0.700 nearest color: gray20 distance: 1.93% ________0-1____________ ___0-255___ __00-ff__ RGB: 0.098 0.196 0.294 25 50 75 19324b HSV: 210 0.667 0.294 CMYK: 0.196 0.098 0.000 0.706 $ cvcolor drab unknown color I know about OliveDrab OliveDrab1 OliveDrab2 OliveDrab3 OliveDrab4 $ cvcolor darkolivegreen Database: DarkOliveGreen ________0-1____________ ___0-255___ __00-ff__ RGB: 0.333 0.420 0.184 85 107 47 556b2f HSV: 82 0.561 0.420 CMYK: 0.086 0.000 0.235 0.580 $ cvcolor Blue Database: blue ________0-1____________ ___0-255___ __00-ff__ RGB: 0.541 0.169 0.886 138 43 226 8a2be2 HSV: 271 0.810 0.886 CMYK: 0.345 0.718 0.000 0.114 $ cvcolor '.1 .2. .3' nearest color: DarkSlateGray distance: 1.93% ________0-1____________ ___0-255___ __00-ff__ RGB: 0.100 0.200 0.300 26 51 77 1a334d HSV: 210 0.667 0.300 CMYK: 0.200 0.100 0.000 0.700 $ cvcolor '25.5 51 76.5' nearest color: DarkSlateGray distance: 1.93% ________0-1____________ ___0-255___ __00-ff__ RGB: 0.100 0.200 0.300 26 51 77 1a334d HSV: 210 0.667 0.300 CMYK: 0.200 0.100 0.000 0.700