Skip to content

Crossterm Reset != Black #2

@joshka

Description

@joshka

Hi there. I was taking a read of the source and noticed that crossterm::Color::Reset gets translated to Black.

CC::Reset => 0.into(),

This is correct only for terminal themes that have their background color and black set to the same value (e.g. all light themes are excluded by this).

Visually, here's the output of the color example from Ratatui (note the color names are Ratatui names, not crossterm ones):

colors

I'm not sure what the right design for this should be in coolor as it seems like it would be use case dependent, but perhaps adding an explicit Reset variant to the color enum. Do you think it would be worth marking this as non-exhaustive to allow adding other color models?

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