Function bgRgb8

  • Set background color using paletted 8bit colors. https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit

    Parameters

    • str: string

      The text color to apply paletted 8bit background colors to

    • color: number

      code

    Returns string

    The text with paletted 8bit background color

    import { bgRgb8 } from "@std/fmt/colors";

    console.log(bgRgb8("Hello, world!", 42));