Opened 13 days ago

Last modified 10 days ago

#28299 needs_information enhancement

Custom colors for Nyx and tor-prompt are needed

Reported by: wagon Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Nyx Version: Tor: 0.3.4.8
Severity: Normal Keywords: tor-prompt
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

If color_interface true is selected for Nyx, some elements are highlighted, but their colors cannot be changed. It would be good to add nyxrc options for custom colors. tor-prompt also needs config options to select colors.

Child Tickets

Change History (4)

comment:1 Changed 12 days ago by atagar

Status: assignedneeds_information

Hi wagon. Sorry, I'm unsure of the ask here. Are you talking about the color_override nyxrc option?

comment:2 Changed 11 days ago by wagon

Are you talking about the ​color_override nyxrc option?

No. In m(enu) -> view -> color you can select either All or particular color (e.g. Green). If you select particular color, only this color (and its bright type) is used for highlighting of all elements (this is color_override option). If you select All, each set of elements is highlighted using different color, but you cannot select the color manually.

Let us consider an example screenshot from the official site. Here you have Yellow for line numbers, Green for names of options, and Red for the value reject *:*. Suppose, you want to have different color scheme: Green for reject *:*, Yellow for option names, and Green for line numbers. Can you make this? No. This is what I would like to get implemented.

You can add nyxrc options like the following:

ColorType1 value1  # Used for highliting nyx menu, errors and reject value.
ColorType2 value2  # Used for tor version value, download graph, normal log mesages, and some options in config editor.
...

where each value can be Red, BrightRed, Green, BrightGreen, etc. This is the approach many console applications are using.

In an ideal case, you could allow users to select different color for each element, i.e. user will not be forced to select a single color for the whole group of elements (an example of group: nyx menu, errors messages, and reject value). Furthermore, you could add a support of RGB colors (can be used in some modern terminals).

Last edited 11 days ago by wagon (previous) (diff)

comment:3 Changed 10 days ago by atagar

Gotcha. I was worried that might be the ask. ;P

Nyx 1.x (ie, when still called 'arm') we had more extensive configurability because I added options to reflect every user request. However, this complicated the codebase with options effectively nobody ever used. As such I've taken a 'less is more' approach with Nyx 2.x, providing a general color override but not per-field configurability.

Lets keep this feature request open for a while to see if others chime in as wanting this. Maybe as part of a 'theming' feature?

In the meantime colors are defined in simple codebase constants so with simple file tweaks (for instance, to 'panels/torrc.py') you should be able to adjust the constants as desired to fit your tastes.

Red, BrightRed, Green, BrightGreen, etc.

It's minor semantics but for what it's worth in curses we have a RRB + CMYK pallet (red, green, blue, cyan, magenta, yellow, black). The 'BrightRed' color you mention is a bold attribute applied to red. That said, on most (but not all) consoles it certainly does look like a brighter red.

comment:4 Changed 10 days ago by wagon

Actually, color names are messy, each console application use its own names (BrightGreen vs Green, or Green vs DarkGreen, etc... some cases even more esoteric: coexisting of some of the values such as DarkWhite, White, BrightWhite, DarkBlack, Black, BrightBlack, DarkGrey, Grey and BrightGrey).

I got your point. Minimal program should be very simple: manually choose color for each set of elements. I guess it is like 5-10 options, just moving those constants to nyxrc. I don't know other popular curses applications which force user to use particular color scheme. :)

Note: See TracTickets for help on using tickets.