Fix condition building for color rule