function bgRgb
bgRgb(
r: number,
g: number,
b: number,
): unknown

Generates an ANSI escape code for the given RGB background color.

Parameters

r: number
  • Red component (0-255)
g: number
  • Green component (0-255)
b: number
  • Blue component (0-255)

Return Type

unknown

ANSI escape code string

Usage

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