implement color legends