Image > Mode > Indexed with Optimal palette is you friend. Then come back to Image > Mode > RGB if necessary (this will keep the 10 colors).
You can also use Colors > Dither but you have to figure out how to split your 10 colors into values count for R/G/B since the total number of colors is the product of these counts. So for 10, that would be it is 2, 5, 1 and you can't have 1...
You can also use Colors > Dither but you have to figure out how to split your 10 colors into values count for R/G/B since the total number of colors is the product of these counts. So for 10, that would be it is 2, 5, 1 and you can't have 1...