# ColorCalc – command-line calculator for colors

If you’re one of the few crazies like me who prefer doing web development using command-line tools, you might appreciate this simple command-line calculator which can operate on RGB colors. It supports the 4 basic arithmetic operations and grouping using parens. Examples:

`C:> colorcalc FFFFFF / 2`

808080 (0.5)

You can use scalar values, as well.

`C:> colorcalc 808080`

808080 (0.501961)

Since 0 is #000000 and 1 is #FFFFFF, 0.5 is between #7F7F7F and #808080.

`C:> colorcalc 808080 * 808080`

404040 (0.251965)

Vector-ish multiplication – approximative equivalent of 0.5 * 0.5.

`C:> colorcalc 1-FFCC00`

0033FF

Get the negative of a color.

`C:> colorcalc (FFCC00 + CCDDFF) / 2`

E6D580

Calculate the mean value of two colors.

etc.