Skip to main content

Crate ggsci_ratatui

Crate ggsci_ratatui 

Source
Expand description

Adapt ggsci palettes to ratatui_core colors and styles.

Core palettes can be sampled with colors, while the dedicated iterm_colors and gephi_colors helpers preserve the distinct inputs required by fixed iTerm themes and generative Gephi palettes. All three sources still use discrete or continuous scale semantics from ggsci.

Enums§

ColorMode
Selects how RGB values are represented in a terminal.

Traits§

ToRatatuiColor
Converts a ggsci color to a ratatui color.

Functions§

ansi256_index
Returns the nearest xterm 256-color index for an RGB value.
background_styles
Builds one background style per color.
color
Converts an RGB value to a ratatui color.
colors
Samples a core palette and converts its colors.
continuous_colors
Interpolates and converts a continuous core palette.
foreground_styles
Builds one foreground style per color.
gephi_colors
Generates and converts colors from a discrete Gephi palette.
gephi_colors_with_seed
Generates reproducible colors from a discrete Gephi palette and converts them.
iterm_colors
Takes and converts colors from a fixed discrete iTerm theme variant.
rgba_over
Composites an RGBA source over an opaque background and converts it.