set_foreground_color method
Sets the console foreground color to a named ANSI color.
There are 16 named ANSI colors, as defined in the AnsiForegroundColor enumeration. Depending on the console theme and background color, some colors may not offer a legible contrast against the background.
Implementation
@override
void set_foreground_color(
final AnsiForegroundColor foreground,
) {
stdout.write(
ansi_set_text_color(foreground),
);
}