Skip to content

Defaulting to no color for output #494

Closed
@sarcasticadmin

Description

@sarcasticadmin

I wanted to discuss the idea of default to no color -t 0 for direwolf. This way direwolf has a sensible default that "just works" across the board. Users can then explicitly set which colors that best fit their output needs via the -t flag. I found the current default output -t 1 a surprise when it was a white background + colors on my black background terminal, and I assumed that something was wrong with my build/configuration/environment.

It looks like this has been somewhat of an ongoing discussion:

  • direwolf/src/textcolor.c

    Lines 43 to 80 in de293a1

    >>>> READ THIS PART!!! <<<<
    *
    *
    * Problem: Years ago, when I started on this...
    *
    * The ANSI escape sequences, used for text colors, allowed 8 basic colors.
    * Unfortunately, white is not one of them. We only have dark
    * white, also known as light gray. To get brighter colors,
    * we need to apply an attribute. On some systems, the bold
    * attribute produces a brighter color rather than a bold font.
    * On other systems, we need to use the blink attribute to get
    * bright colors, including white. However on others, blink
    * does actually produce blinking characters.
    *
    * Previously, the only option was to put "-t 0" on the command
    * line to disable all text color. This is more readable but
    * makes it harder to distinguish different types of
    * information, e.g. received packets vs. error messages.
    *
    * A few people have suggested ncurses.
    * I looked at ncurses, and it doesn't seem to be the solution.
    * It always sends the same color control codes rather than
    * detecting the terminal type and adjusting its behavior.
    *
    * Version 1.6:
    *
    * For a long time, there was a compile time distinction between
    * ARM (e.g. Raspberry Pi) and other platforms. With the arrival
    * of Raspbian Buster, we get flashing and the general Linux settings
    * work better.
    *
    * Since there doesn't seem to be a single universal solution,
    * the text color option will now be allowed to have multiple values.
    * Several people have also complained that bright green is
    * very hard to read against a light background so only dark green will be used.
    *
    *--------------------------------------------------------------------*/
  • Direwolf does not respect user's terminal background colour #477
  • Direwolf terminal blinking. #270
  • Please allow disabling of terminal colors #247
  • Text and window color preferences don't stick #108

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions