Move optional color logic to prevent possible flicker.