fromUv static method

TerminalNativeColor? fromUv(
  1. UvColor? color
)

Converts a UV color to a native snapshot.

Implementation

static TerminalNativeColor? fromUv(UvColor? color) {
  return switch (color) {
    null => null,
    UvBasic16(:final index, :final bright) => _basic16Color(index, bright),
    UvIndexed256(:final index) => _indexed256Color(index),
    UvRgb(:final r, :final g, :final b, :final a) => _rgbColor(r, g, b, a),
  };
}