One possible solution could be to group some of the categories together in order to reduce the number of unique categories within the variable. For example, if you have 10 categories, you could group them into 5 groups of 2 categories each. This would allow you to assign a different color to each group, rather than to each individual category.
Alternatively, you could use a different type of mapping, such as a choropleth map, which uses a continuous color scale to represent a numeric variable rather than categorical data.