Hi I am unable to find any resources online about my current problem.

What I have is a bowl with $x$ balls and I want to know how many orders are possible when I pull out $k$ balls.

My problem is that there are different ball colors and not all of those colors have the same amount of balls.
So for instance I could have a bowl $B$ with $5$ balls $B=\{r, r, g, g, b\}$

This is where I am stuck, I known that the number of permutations for $B$ is $5!$ if you don't think of balls with the same color as being the same, however I am only interested in the order of the colors.

If you would swap the position of 2 same colored balls I want both orders to be the same permutation.

So what I have come up with is this:

$\dfrac{x!}{(c_1!*c_2!*...c_n!)}$

I am still not quite sure if this is correct, however ProjectEuler (#15) accepted my solution.

Where I am still in the dark is what I should do if I don't want to pull out all balls. So instead of taking all the $x$ balls out of the bowl I only want to take $n$ how can I get the number of permutations for those orders?

I would also appreciate if someone could tell me if there is a better way to call this problem since the google results I got when searching for "Permutations with groups of different sizes" did not really address my problem.