Skip to content

Support white background terminals #156

@goerz

Description

@goerz

This library assumes that it is being used in a dark background terminal.

It would be great to be able to use it in white background terminal:

fa210621469e109f0b1b942c7248a782f4de7f59_2_290x500

  • There seem to be many hard-code color values, for example, the name of the scheme being printed in white in the above screenshot, from here:

    Term.jl/src/theme.jl

    Lines 94 to 105 in 4ab195d

    return print(
    io,
    Panel(
    content;
    width = 44,
    justify = :center,
    title = "Theme: {bold}$(theme.name){/bold}",
    padding = (4, 4, 1, 1),
    style = "#9bb3e0",
    title_style = "white",
    ),
    )

    Similarly, there are lots of hard-coded values in errors.jl and logs.jl, which unfortunately makes the otherwise very nice install_term_logger and install_term_stacktrace impossible to use. All of these colors should refer to something configurable in the color scheme

  • There should be a switch to turn off all color, for monochrome or reduced-color terminals. The framed backtraces and such would be quite nice to have, but they should be rendered black on white (or white on black) in such environments

  • It would be nice to have a built-in colorscheme that is tested for readability on white background terminals.

  • The cherry on top would be to detect the background color of the terminal (e.g. via the COLORFGBG environment variable) and to choose the default scheme based on that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions