This question already has an answer here:
I don’t know that there is a simple closed formula for this, but there is a fairly simple way to compute it recursively.
Let’s say we are looking for color $1$, just to be specific. For any data $\{c_i\}_{1}^m$, let E[{c_i}] be the expected number of turns required to find color 1. We see that:
$$E[\{c_i\}]=\frac{c_1}{\sum {c_i}}\,1+\sum_{j=2}^{j=m}\frac{c_j}{\sum {c_i}}(E[\{c_1,c_2, …,\hat {c_j},…c_m\}]+1)$$ Where, as usual, the $\hat {c_j}$ means that this term is deleted from the data.
this is very easy to automate. Perhaps it can be solved in closed form, though the shifting probabilities make that look a little daunting.
The closed form seems hard. A computational alternative is: