<p>I could not find a tool with this ability, so I made one using the Rebrickable API. You can find it here:</p>

<p><a href="https://gist.github.com/ali1234/836ba792390c1a5feca9a3dcb35c14af" rel="noreferrer">https://gist.github.com/ali1234/836ba792390c1a5feca9a3dcb35c14af</a></p>

<p>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.</p>

<p>Optional rarity parameter can be used to avoid very rare parts.</p>

<p>Example output:</p>

<pre><code>./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
</code></pre>

CC BY-SA 3.0
2017-03-29T23:16:23.867Z
2017-03-29T23:39:18.557Z
2017-03-29T23:39:18.557Z
Alistair Buxton
<p>Is there a tool which, given a list of parts, will tell me the common colours, i.e. the colours that <strong>all</strong> the parts are available in?</p>

CC BY-SA 3.0
2017-03-29T02:34:44.563Z
Can you add more detail about the model? Do you have a set number, a plan or an image of it?
pcantin
CC BY-SA 3.0
2017-03-29T10:48:50.470Z
I guess you are not looking for the part-by-part solution that Bricklink provides?
Metalbeard
<colour><cad>
In what colours can I build my whole model?
Alistair Buxton
# In what colours can I build my whole model?

(Asked by: username_0 on 2017-03-28)

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?

**Tags:** colour, cad

> **Comments:**
> **username_1**: Can you add more detail about the model? Do you have a set number, a plan or an image of it?  
> **username_2**: I guess you are not looking for the part-by-part solution that Bricklink provides?  

---

## 1 answers

### Answer by username_0 on 2017-03-29. Score: 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


---

