method PrinterService.color
PrinterService.color(
message: string,
hexFormattedColor: string,
): string

Return the provided message so that the foreground is the specified color. Has no effect if colorEnabled is false.

Parameters

message: string

the message to color.

hexFormattedColor: string

the color to use. This should be a valid hex formatted string e.g. "#rrggbb".

Return Type

string

Usage

import type PrinterService from ".";