Clean up color functions a bit and return shorthand hexcodes when possible.