Before modifying any app's color-related code:
- Read the app's
design.mdto understand its color role mapping. - Read
shared/pebble_pastel.hfor the theme definitions. - Use
s_theme.accent,s_theme.secondary,s_theme.highlight,s_theme.primary,s_theme.muted— never hardcode GColor values for themed elements. - After modifying color usage, update the app's
design.mdto reflect changes.
Every app's design.md must accurately reflect the current color role mapping in main.c. If you change which role a UI element uses, update design.md in the same edit session. The design.md is the source of truth for intent; the code is the source of truth for implementation. They must agree.
All apps support user-selectable themes via phone settings:
package.jsonmust include"Theme"in messageKeyssrc/pkjs/index.jsmust include the theme picker radio buttonssrc/main.cmust handlePASTEL_MSG_KEY_THEMEininbox_received- Theme is persisted with
persist_write_int(PASTEL_STORAGE_KEY_THEME, ...)
- Create
src/main.cwith#include "../shared/pebble_pastel.h" - Add
PastelTheme s_themeand load/save logic - Add theme picker to phone config
- Create
design.mdwith the role mapping table - Choose appropriate default theme (see CLAUDE.md for category defaults)