Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
variable colorize
import { colorize } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Add special characters to text to print in color in the console (combined with console.log()).

Use template literals and special characters to add the appropriate color code to the string output. For background colors, add a special character that resets the background color at the end of the string.