InfiniTimeOrg / InfiniTimeOrg/InfiniTime

Make color definitions more global in source code

Open
#559 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question/discussion
Dominant language
C
Stars
3.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I'm not sure this is the right place to bring such stuff, if not then sorry.

I've been trying to change the colors for the notification app today (not really a fan of the original), and I noticed that there are many defines such LV_COLOR_ORANGE in many places, or sometimes even lv_color_hex(0x888888). So if you want to change colors for whole screen, you need to find all occurrences and replace them with new color.

I think if we had some global defines in separate header file, with more user-(programmer-)friendly names, like LV_COLOR_BG_CLOCKAPP, LV_COLOR_TEXT_NOTIFICATIONTITLE or something, with LV_COLOR_RED/BLUE/something assigned to it, managing themes would become way easier.
Creators of new watchfaces/themes would just have to work with single .h file and it all would become a bit more readable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by searching the source for LV_COLOR_ORANGE and lv_color_hex occurrences, then identify how notification-app colors are distributed. Review the existing color definitions and decide whether a shared header and semantic names can cover the affected screens. Done means theme colors can be managed from one place without changing every occurrence individually.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.