[PATCH 2/2] logging: Call color only once and use the result