How to create a conditional color to a specific text (i know it has just to number) but how to do it with a specific text too?

Like that image i sent, where is written black i want to be black with white text, where is written Red i want to be Red with white text and so on, does someone know how to do that like google sheets?

Conditional Formatting