Skip to main content

GREEN_FG

Constant GREEN_FG 

Source
pub const GREEN_FG: &'static str;
Expand description

Set the foreground color to green (bright green).

Equivalent to CSI 9 2 m

Foreground color can be reset with RESET_FG or RESET. Note that RESET will also reset all text modes.

§Example

use termal_core::codes;

let mut buf = codes::CLEAR.to_string();

buf += "normal";
buf += codes::GREEN_FG;
buf += " green";
buf += codes::GREEN_DARK_FG;
buf += " dark\n";
buf += codes::RESET_FG;

buf += codes::FAINT;
buf += "faint ";
buf += codes::GREEN_FG;
buf += " green";
buf += codes::GREEN_DARK_FG;
buf += " dark";
buf += codes::RESET;

println!("{buf}");

§Result in terminal