puzzmo-theme
Puzzmo Theme
Convert the game's colors to use Puzzmo theme tokens, enabling automatic light/dark mode.
Steps
-
Review the theme object received from
sdk.gameReady().You should be replacing every statically assigned (#XXXXXX) color with a color dynamically linked from the puzzmo theme. Here is your guide to choosing the right theme color, based on how colors are actually used across all Puzzmo games.
Here is the general rule of thumb for picking colors aside from black/white: Puzzmo has 5 colors that come from the theme that should be used for all colored game elements, with this priority:
g_key,player,alt1,alt2,alt3. If you need more colors, perform a hue shift on one of those to find a color that's differentiated.Primarily, these are the 5 colors you should be using for every colorful element in the game. All Puzzmo games are designed to never use a color semantically, like for example, red for error. That may not be the case with the game that you are being brought in to reassign colors for. It may be appropriate for you to ask the user if a particular color should be replaced with a theme color or if it should remain statically defined if it seems like that color may be being used to convey semantic information.
If you need UI colors like black and white for frame elements, or need more nuance to determine what to do, there is additional detail provided below: