Skip to main content

set_colors

Function set_colors 

Source
pub fn set_colors(c: Colors)
Expand description

Replace the colour palette wholesale — handy for shipping named themes.

use cli_ui::prompt::settings::{set_colors, Colors};

// A monochrome "no-color" palette built off the default and then tweaked.
let mut c = Colors::default();
let bold = anstyle::Style::new().bold();
c.accent = bold; c.success = bold; c.error = bold;
c.cancel = bold; c.title = bold;  c.header = bold;
set_colors(c);