> I need to transform r:g:b triplets to hexidecimal colors in a bash
> shell script. Does anyone have an expression that will do that?
awk with %x or %X:
echo 255 | awk '{printf("%x\n", $1)}'
echo 255:255:255 | tr ':' ' ' | awk '{printf("%X:%X:%X\n", $1, $2, $3)}'
Hamish