fixed (re-wrote) color parser