changed color macros to inline functions, added ABS macro