5

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?

  • Can you add more detail about the model? Do you have a set number, a plan or an image of it? – pcantin Mar 29 '17 at 2:34
  • I guess you are not looking for the part-by-part solution that Bricklink provides? – Aziraphale Mar 29 '17 at 10:48
5

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.