Skip to content

A better dark-mode xterm.js color theme? #1666

Closed

Description

@iliana

This is a very silly nit that is probably not a realistic customer pain point but figured I'd report it.

Hopping on the serial console for a Linux instance and running

export TERM=xterm-256color # "256color" probably doesn't matter for htop
stty columns 160 rows 40 # your browser size may vary
htop

results in:

image

i.e. colors work, but the color htop uses for its dimmed text is unreadable on a black background.

Activity

  1. iliana commented on Jul 17, 2023

    @iliana
    ContributorAuthor

    Decided to give this a whirl with npm run start:dogfood; this appears nicer:

    diff --git a/app/components/Terminal.tsx b/app/components/Terminal.tsx
    index 24feebd1..e688800c 100644
    --- a/app/components/Terminal.tsx
    +++ b/app/components/Terminal.tsx
    @@ -33,7 +33,7 @@ function getOptions(): ITerminalOptions {
           background: style.getPropertyValue('--surface-default'),
           foreground: style.getPropertyValue('--content-default'),
           black: style.getPropertyValue('--surface-default'),
    -      brightBlack: style.getPropertyValue('--surface-secondary'),
    +      brightBlack: style.getPropertyValue('--content-quinary'),
           white: style.getPropertyValue('--content-default'),
           brightWhite: style.getPropertyValue('--content-secondary'),
           blue: style.getPropertyValue('--base-blue-500'),

    image

  2. david-crespo commented on Jul 17, 2023

    @david-crespo
    Collaborator

    That’s great. I wonder if someone has written a tool or even just some guidelines about what contrast ratios you want between which pairs of colors.

  3. iliana commented on Jul 17, 2023

    @iliana
    ContributorAuthor

    Honestly not sure. (I used to be a diehard user of gnome-terminal's Xterm theme (or was it urxvt? it's been too long) simply because that was the only theme where a blue background/white text status bar (a la irssi/weechat) had good enough contrast. Most default terminal themes do not bother making that look good. Since then I have gone way off the deep end anyway so maybe I have thought a little too hard about this.)

    I'll try to do some comparisons between the console CSS and some default terminal themes when I have a chance. Overall I think what we have now works, apart from brightBlack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions