JavaScript for WordPress Forums Gutenberg Development How to get a color class name Reply To: How to get a color class name

#47927
Zac Gordon
Keymaster

Few things:

1. Make sure you’ve added custom colors to your theme or plugin
2. Make sure to import getColorClass from editor
3. Setup your attributes all the same way as before (I believe)
4. Save getColorClass( ‘color’, colorName ) to a variable
5. Wherever you want to use that custom CSS name, call that variable

Hope this helps!

I don’t have any examples of this at the moment, but I will make a note for the next course update 🙂