Updated color calculation