Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

Changing the colour of macros on the macro bar?

I've spent some time looking into any relevant documentation, but I can't seem to find a way to change the background colour of a macro on the macro bar through an API. Am I missing something? If it isn't possible to do this through the API, is there another way to do this (except for doing it manually)? I'm trying to create a toggle-like feeling by swapping between two colours by clicking the button.
I had never thought of this before, but here's my initial findings. This macro information is saved in the specific player's attribute, _macrobar . The value for this attribute is a comma separated list that follows the following format PLAYER_ID|MACRO_ID[|#COLOR|DISPLAY NAME] I'm not entirely sure why the player name is needed in this value, maybe it is needed to check if the player has access to the macro. If the macro background is a different color than normal, it will be in Hexadecimal format with the number sign in front of it. For example PLAYER_ID|MACRO_ID|#9900ff If the macro has a different name in the macro bar than the original macro (this is usually the case for character abilities added to the macro bar) it will be added after the color code. This is still true even if the background color for the macro is the normal color, except there is no color code provided. For example PLAYER_ID|MACRO_ID|#|DISPLAY_NAME
Kyle G. said: I had never thought of this before, but here's my initial findings. This macro information is saved in the specific player's attribute, _macrobar . The value for this attribute is a comma separated list that follows the following format PLAYER_ID|MACRO_ID[|#COLOR|DISPLAY NAME] I'm not entirely sure why the player name is needed in this value, maybe it is needed to check if the player has access to the macro. If the macro background is a different color than normal, it will be in Hexadecimal format with the number sign in front of it. For example PLAYER_ID|MACRO_ID|#9900ff If the macro has a different name in the macro bar than the original macro (this is usually the case for character abilities added to the macro bar) it will be added after the color code. This is still true even if the background color for the macro is the normal color, except there is no color code provided. For example PLAYER_ID|MACRO_ID|#|DISPLAY_NAME Interesting find. Unfortunately, it's a read-only property so it can't be overwritten with a new value.