I love how colourful and sparkly everything is during holiday season, dont you? And today I'll share with you a tool that makes terminal a lot more festive as well!
Install the dependency, e.g:
deno add npm:gradient-string
Create a script, e.g. main.ts
:
import gradient from "npm:gradient-string"; console.log(gradient(["red", "green"])("Happy Holidays"));
And run with deno -A main.ts
:
And if that didn't impress you, try this one:
import { pastel } from "npm:gradient-string"; console.log( pastel.multiline( ` . . . + . . . . . . # . . . . ### . . . . . "#:. .:##"##:. .:#" . . . . "####"###"####" . . "#:. .:#"###"#:. .:#" . . . . "#########"#########" . . . "#:. "####"###"####" .:#" . . . . "#######""##"##""#######" . ."##"#####"#####"##" . . . "#:. ... .:##"###"###"##:. ... .:#" . . "#######"##"#####"##"#######" . . . . "#####""#######""#####" . . . " 000 " . . . . . 000 . . . .. .. ..................O000O........................ ...... ...` ) );
Now, that's sight to behold:
Liked the content and would love to have more of it all year long?
Top comments (2)
I use lolcat for this. That doesn't integrate with node or anything, it's a plain old command, but that means I can pipe things to it like
figlet
ortoilet
, and you can even run a shell through it so everything is colourised as you type!Oh nice! Funny ruby library :) Thank you for sharing!