Skip to main content
Module

x/deno_run/deps.ts>Colors.rgb24

A project manifest and runner for Deno.
Latest
function Colors.rgb24
import { Colors } from "https://deno.land/x/deno_run@0.3.0/deps.ts";
const { rgb24 } = Colors;

Set text color using 24bit rgb. color can be a number in range 0x000000 to 0xffffff or an Rgb.

To produce the color magenta:

 rgba24("foo", 0xff00ff);
 rgba24("foo", {r: 255, g: 0, b: 255});

Parameters

str: string
color: number | Rgb

Returns

string