Function terminal_light::background_color
source · [−]Expand description
Try to determine the background color of the terminal.
The result may come as Ansi or Rgb, depending on where the information has been found.
If you want it as RGB:
let backround_color_rgb = terminal_light::background_color()
.map(|c| c.rgb()); // may be an error