Crate ratatui_base16

source ·
Expand description

§ratatui-base16

Crates.io Documentation LICENSE

ratatui-base16 is a base16 palette library for the Ratatui crate in Rust.

§Getting Started

To get started, first add it to your Cargo.toml dependencies:

$ cargo add ratatui-base16

Creating a Base16Palette is simple. Here’s a quick example:

use ratatui_base16::Base16Palette;
let palette = Base16Palette::from_yaml("./config/dracula.yaml");

§Contributing

Please feel free to fork the repository, make your changes, and submit a pull request.

§License

See LICENSE for details.

Structs§

  • A Base16Palette defines a color palette based on the Base16 styling guidelines. These color codes are typically used to create themes for syntax highlighting, terminal emulators, and other developer tools. Each field represents a different element of the user interface that can be customized. Base16 aims to group similar language constructs with a single colour. For example, floats, ints, and doubles would belong to the same colour group. The colours for the default theme were chosen to be easily separable, but scheme designers should pick whichever colours they desire, e.g. base0B (green by default) could be replaced with red. There are, however, some general guidelines below that stipulate which base0B should be used to highlight each construct when designing templates for editors.

Enums§

  • The Base16PaletteError enum represents errors that can occur while working with the Base16 color palette configuration.

Constants§