RoboSkillHub
Catalog / Tools
tool

colour

What colour a segmented part is — robust colour of a mask (boundary eroded, clipped highlights dropped, lightness tails trimmed, Lab median), nearest entry of a palette by CIEDE2000 with the margin to the runner-up and an ambiguous / unknown status, white balance from grey world or a white/grey reference region, and a mask's dominant colours. Built-in palettes are the LDraw LEGO/DUPLO colours and domino tile/pip colours; a per-camera palette learned from labelled parts is passed as a list. Use when a workflow must tell bricks, tiles or parts apart by colour (sorting, find-the-red-2x4, verifying a build), especially the pairs VLMs confuse -- black vs dark grey, tan vs yellow.

Kind
Tool · perceive: finds and measures things in the scene
Robots
any robot, tuned on yam-station-orbbec-overhead
Tasks
sorting pick-place recognition
Runs
in its own environment over stdio-msgpack
Used by
checkpointing-assembly-state-for-resume, routing-parts-to-sort-bins-by-id-and-colour, verifying-build-against-model
License
Apache-2.0
Source
source on GitHub · SKILL.md · upstream code · G. Sharma, W. Wu, E. N. Dalal, "The CIEDE2000 color-difference formula", Color Res. Appl. 30(1), 2005 · v0.1.0

Note

On the YAM station's overhead camera the LDraw values alone are not enough (58-65% on real frames); a palette measured on that camera (colour.measure) with a bench reference reached 91%. LDraw colour values CCAL 2.0 (CC BY 2.0), LDraw.org.

Functions

colour.classify Name a segmented part's colour from a palette (LEGO, DUPLO, domino or custom) by CIEDE2000, with the margin to the runner-up and an ambiguous status.
colour.measure Robust colour of a mask (Lab and sRGB, highlights and shadows trimmed), to build a per-camera palette from labelled parts.
colour.white_balance Per-channel white-balance gains from grey world or from a white/grey reference region; optionally the balanced image.
colour.dominant_colours Cluster a mask into its dominant colours (k-means in Lab, near clusters merged), each with its share and optionally its palette name.

Use it

Take this bundle (and the tools it calls) into a registry for your task, then point your policy generator at it:

git clone https://github.com/runtime-si/RoboSkillHub
cd RoboSkillHub && uv sync
uv run --no-sync roboskillhub search "what colour a segmented part is" --why
uv run --no-sync roboskillhub view --bundles colour --out my_registry

See Get started for searching by task and robot, locking what a policy uses, and fetching it on the robot.