Methods
rainbow(message)
Prints a message in rainbow colors
Parameters
-
message
StringThe message to print
Example
rainbow("Hello, world!");
Source
async
renderImage(img) → {Promise.<String>}
Returns a console.log-able string of the image
Parameters
-
img
Buffer|StringThe image to render, as a Buffer or a file path
Returns
-
Promise.<String>The image, as a string
Example
renderImage("image.png").then(console.log);
Source
async
renderVideo(videoPath) → {Promise.<Array.<String>>}
Convert a video to ASCII
Parameters
-
videoPath
StringThe file path to the video
Returns
-
Promise.<Array.<String>>The video, as an array of frames
Example
renderVideo("video.mp4").then(console.log);
Source
rgbToAnsi256(r, g, b) → {number}
Converts RGB to ANSI 256 color
Parameters
-
r
numberRed -
g
numberGreen -
b
numberBlue
Returns
-
numberThe ANSI color code
Example
rgbToAnsi256(255, 255, 255);