setBackgroundColor method

void setBackgroundColor(
  1. RendererHandle renderer,
  2. Color color
)

Sets the terminal background color.

Implementation

void setBackgroundColor(RendererHandle renderer, Color color) {
  validateColorChannels(color);
  _guardAlloc('Failed to set background color', (allocator) {
    _native.setBackgroundColor(
      renderer.value,
      _colorToNative(color, allocator),
    );
  });
}