function bg256
bg256(bg: number): string

Generates an ANSI escape code for setting the background color using 8-bit color codes.

Parameters

bg: number
  • The 8-bit color code for the background (0-255).

Return Type

string

The ANSI escape code string for setting the background color.

Usage

import { bg256 } from "sgr/index.ts";