Home > @microsoft/node-core-library > Colors

Colors class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The static functions on this class are used to produce colored text for use with the node-core-library terminal.


export declare class Colors 


Method Modifiers Description
black(text) static (BETA)
blackBackground(text) static (BETA)
blink(text) static (BETA)
blue(text) static (BETA)
blueBackground(text) static (BETA)
bold(text) static (BETA)
cyan(text) static (BETA)
cyanBackground(text) static (BETA)
dim(text) static (BETA)
gray(text) static (BETA)
grayBackground(text) static (BETA)
green(text) static (BETA)
greenBackground(text) static (BETA)
hidden(text) static (BETA)
invertColor(text) static (BETA)
magenta(text) static (BETA)
magentaBackground(text) static (BETA)
red(text) static (BETA)
redBackground(text) static (BETA)
underline(text) static (BETA)
white(text) static (BETA)
whiteBackground(text) static (BETA)
yellow(text) static (BETA)
yellowBackground(text) static (BETA)


terminal.writeLine(Colors.green(‘Green Text!’), ‘ ‘, Colors.blue(‘Blue Text!’));