Skip to content

Enforce a minimum contrast level #1514

Closed

Description

@jaredly

(I'm on VSCode 1.24.1)
iTerm2 has this really nice feature where you can enforce a minimum level of contrast, which is invaluable to making sure that all text shows up, regardless of color scheme / background color.
image

For example, the text to the right is basically unreadable, unless I select it, in which case it becomes marginally readable.
image

It would be awesome to have an option to enforce a minimum level of contrast.

It looks like

protected drawChar(terminal: ITerminal, char: string, code: number, width: number, x: number, y: number, fg: number, bg: number, bold: boolean, dim: boolean, italic: boolean): void {
would be the place to do it? although I guess it might need some changes to the CharAtlast as well

Activity

  1. Tyriar commented on Jun 15, 2018

    @Tyriar
    Member

    I guess this could be an opt-in setting which overrides the foreground color and if necessary the background color too?

    Foreground and background are done in 2 passes so it might get tricky how to influence both. Perhaps only changing one or the other would be better? This should be done in the TextRenderLayer:

    this._drawBackground(terminal, firstRow, lastRow);

  2. jaredly commented on Jun 15, 2018

    @jaredly
    Author

    I think that iterm2 only modifies the foreground color, and I think that should be sufficient

  3. added this to the 4.3.0 milestone on Nov 12, 2019
  4. self-assigned this
    on Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址