Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/fmt/colors.ts>rgb8

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function rgb8
import { rgb8 } from "https://deno.land/std@0.215.0/fmt/colors.ts";

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

Parameters

str: string

text color to apply paletted 8bit colors to

color: number

code

Returns

string