Is there a tool which, given a list of parts, will tell me the common colours, i.e. the colours that all the parts are available in?
1 Answer
I could not find a tool with this ability, so I made one using the Rebrickable API. You can find it here:
https://gist.github.com/ali1234/836ba792390c1a5feca9a3dcb35c14af
It parses an LDraw file and selects all the bricks of a specified colour (by LDraw colour number, eg yellow = 14), then for each unique piece it requests all available colours. Finally it calculates the intersection of all colours and prints a list.
Optional rarity parameter can be used to avoid very rare parts.
Example output:
./colourswap pirover.ldr 14
Parts:
3665, 2730, 3660, 3455, 3005, 3002, 3702, 3703, 3700, 3701, 3895
Common Colours:
Blue, Yellow, Black, White, Light Gray, Red, Light Bluish Gray
./colourswap pirover.ldr 14 20
Parts:
3665, 2730, 3660, 3455, 3005, 3002, 3702, 3703, 3700, 3701, 3895
Common Colours:
Black, Red