set_material
Apply a named color or hex color to a SketchUp entity. Paints only the selected instance for groups and components.
Instructions
Assign a material (color) to a group or component.
material accepts a named color — red, green, blue, yellow, cyan, turquoise, magenta, purple, white, black, brown, wood, orange, gray, grey — or a 6-digit hex string like "#a05030" (#rrggbb). Anything else fails with error -32602. Named colors are case-insensitive. Painting affects only this instance (it is made unique first). That applies to groups/components; painting a raw face/edge id (obtainable via get_selection) colors the shared definition — all instances show it.
Returns: JSON {id, name, type, bbox_mm{min,max}|null}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Entity ID from a previous response (integer or its string form) | |
| material | Yes | Named color or 6-digit hex string like #a05030 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |