mathoudebine / turing-smart-screen-python

Unofficial Python system monitor and library for small IPS USB-C displays like Turing Smart Screen or XuanFang
GNU General Public License v3.0
1.05k stars 174 forks source link

Stat Value Adaptive Text Color #399

Open CaraesNaur opened 9 months ago

CaraesNaur commented 9 months ago

Is your feature request related to a problem? If so, please describe the problem.
Text color is static: it cannot express additional information about displayed values.

Describe the feature / solution to your problem you'd like
Consider a theme which displays CPU temperature in white. The temperature is always that color, whether the CPU is idle or has been at 100% load for an hour and presumably quite hot.

With this feature, the CPU temperature display could change color as the value changes:

Color changes can be a more effective warning than the value itself.

The same could be applied most values. For simplicity, stages would progress from lowest to highest threshold, presumably starting from 0 or the lowest logical value. Whether the colors progress in terms of alarm depends on context and design theme preference.

Describe alternatives you've considered / and or tested
None.

Screenshots / photos & mockups of the Turing screen
N/A.

Environment:

Additional context
A new optional ADAPTIVE_FONT_COLOR line in text options would, when present, override the FONT_COLOR value. It would require between two and five stages. Each stage's syntax could be like:

[value], [red], [green], [blue];

Thus the scenario described above would be defined by:

STATS:
  CPU:
    TEMPERATURE:
      TEXT:
        ADAPTIVE_FONT_COLOR: 0, 255, 255, 255; 35, 255, 255, 0; 60, 255, 153, 0; 75, 255, 0, 0;