toSequences method

List<Sequence> toSequences()

Returns a list of ANSI escape sequences that represent this style.

Implementation

List<Sequence> toSequences() {
  return [
    if (foreground case final Color fg) fg.setForeground().toSequence(),
    if (background case final Color bg) bg.setBackground().toSequence(),
  ];
}