Question: Colors Definition explained
Hi there,
Was fiddling around with the colors / making a custom theme.
I find it a bit hard to match the definitions with the visual elements in the UI. Is there some kind of documentation available in which it is explained which definition belong to which visual element?
Cheers...,
There is no explicit documentation for the individual elements of the color scheme. The names used for those constants are aimed to be self-descriptive, but for some names it helps to have a look at the places in the code where these values are used.
Any particular places where you would like to change colors?
Thanks @BenBE,
One I'm particularly interested in are the percentages/numbers for the CPU utilization. In the image the standard theme is used.

Since I have been experimenting with the colours I actually would like know as much elements as possible.
Another question, since we're at it.:) The function key bar has that intentionally been limited to a width of 80 chars?
Thanks @BenBE,
One I'm particularly interested in are the percentages/numbers for the CPU utilization. In the image the standard theme is used.
Since I have been experimenting with the colours I actually would like know as much elements as possible.
The colors are determined by https://github.com/htop-dev/htop/blob/main/Meter.c#L250
In the case of e.g. the CPU meter this boils down to the values defined in https://github.com/htop-dev/htop/blob/main/CPUMeter.c#L25-L34
Overall each meter has a attribute array defined alongside it which gives which colors are used for each of the different values it can show. Each meter's implementation CAN overwrite this (usually done for text display), but normally colors are sourced from there …
Another question, since we're at it.:) The function key bar has that intentionally been limited to a width of 80 chars?
The items shown on the function bar are hard-coded strings with the spaces/blanks included.