def METHOD_NAME(d, path):
    check_allowed_properties(d, path, ("type", "name", "color"))
    check_required_properties(d, path, ("type", "name"))
    check_text(d['name'], path + ".name")
    if 'color' in d:
        check_color(d['color'], path + ".color")