ChalkString extension

Extensions on the String class that allow you to use the Chalk methods directly on Strings, ie. 'This will be red italic'.red.italic 'This will be red on yellow background'.red.onYellow

on

Properties

bgBlack String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBlack. Set background base 16 xterm colors black (terminal dependent) linen
no setter
bgBlackBright String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightBlack. Set background base 16 xterm colors bright black (terminal dependent) linen
no setter
bgBlue String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBlue. Set background base 16 xterm colors blue (terminal dependent) linen
no setter
bgBlueBright String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightBlue. Set background base 16 xterm colors bright blue (terminal dependent) linen
no setter
bgBrightBlack String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightBlack. Set background base 16 xterm colors bright black (terminal dependent) linen
no setter
bgBrightBlue String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightBlue. Set background base 16 xterm colors bright blue (terminal dependent) linen
no setter
bgBrightCyan String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightCyan. Set background base 16 xterm colors bright cyan (terminal dependent) linen
no setter
bgBrightGreen String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightGreen. Set background base 16 xterm colors bright green (terminal dependent) linen
no setter
bgBrightMagenta String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightMagenta. Set background base 16 xterm colors bright magenta (terminal dependent) linen
no setter
bgBrightRed String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightRed. Set background base 16 xterm colors bright red (terminal dependent) linen
no setter
bgBrightWhite String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightWhite. Set background base 16 xterm colors bright white (terminal dependent) linen
no setter
bgBrightYellow String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightYellow. Set background base 16 xterm colors bright yellow (terminal dependent) linen
no setter
bgCyan String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onCyan. Set background base 16 xterm colors cyan (terminal dependent) linen
no setter
bgCyanBright String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightCyan. Set background base 16 xterm colors bright cyan (terminal dependent) linen
no setter
bgGray String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onGray. Set background base 16 xterm colors gray (alternate name for bright black) (terminal dependent) linen
no setter
bgGreen String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onGreen. Set background base 16 xterm colors green (terminal dependent) linen
no setter
bgGreenBright String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightGreen. Set background base 16 xterm colors bright green (terminal dependent) linen
no setter
bgGrey String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onGrey. Set background base 16 xterm colors grey (alternate name for bright black) (terminal dependent) linen
no setter
bgMagenta String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onMagenta. Set background base 16 xterm colors magenta (terminal dependent) linen
no setter
bgMagentaBright String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightMagenta. Set background base 16 xterm colors bright magenta (terminal dependent) linen
no setter
bgRed String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onRed. Set background base 16 xterm colors red (terminal dependent) linen
no setter
bgRedBright String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightRed. Set background base 16 xterm colors bright red (terminal dependent) linen
no setter
bgWhite String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onWhite. Set background base 16 xterm colors white (terminal dependent) linen
no setter
bgWhiteBright String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightWhite. Set background base 16 xterm colors bright white (terminal dependent) linen
no setter
bgYellow String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onYellow. Set background base 16 xterm colors yellow (terminal dependent) linen
no setter
bgYellowBright String

Available on String, provided by the ChalkString extension

Legacy api, provided only for backwards compatibility, use onBrightYellow. Set background base 16 xterm colors bright yellow (terminal dependent) linen
no setter
black String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors black (terminal dependent) linen
no setter
blackBright String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright black (terminal dependent) linen
no setter
blackletter String

Available on String, provided by the ChalkString extension

blackletter - alternate name for font10, ANSI/ECMA-48 spec refers to font10 specifically as a blackletter or Fraktur (Gothic) font. (Not as widely supported, supported in VSCode through my PR)
no setter

Available on String, provided by the ChalkString extension

blink - Make text blink. (Not as widely supported, supported in VSCode through my PR)
no setter
blue String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors blue (terminal dependent) linen
no setter
blueBright String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright blue (terminal dependent) linen
no setter
bold String

Available on String, provided by the ChalkString extension

bold - Make text bold.
no setter
brightBlack String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright black (terminal dependent) linen
no setter
brightBlue String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright blue (terminal dependent) linen
no setter
brightCyan String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright cyan (terminal dependent) linen
no setter
brightGreen String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright green (terminal dependent) linen
no setter
brightMagenta String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright magenta (terminal dependent) linen
no setter
brightRed String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright red (terminal dependent) linen
no setter
brightWhite String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright white (terminal dependent) linen
no setter
brightYellow String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright yellow (terminal dependent) linen
no setter
cyan String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors cyan (terminal dependent) linen
no setter
cyanBright String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright cyan (terminal dependent) linen
no setter
dim String

Available on String, provided by the ChalkString extension

dim - Emitting only a small amount of light.
no setter
doubleUnderline String

Available on String, provided by the ChalkString extension

doubleUnderline (alternate name for doubleunderline) - alternate for doubleunderline
no setter
doubleunderline String

Available on String, provided by the ChalkString extension

doubleunderline - Make text double underlined. (Not as widely supported, supported in VSCode through my PR)
no setter
doubleunderlined String

Available on String, provided by the ChalkString extension

doubleunderlined (alternate name for doubleunderline) - Make text double underlined. (Not as widely supported, supported in VSCode through my PR)
no setter
font1 String

Available on String, provided by the ChalkString extension

Alternative font 1. (Not as widely supported, supported in VSCode through my PR)
no setter
font2 String

Available on String, provided by the ChalkString extension

Alternative font 2. (Not as widely supported, supported in VSCode through my PR)
no setter
font3 String

Available on String, provided by the ChalkString extension

Alternative font 3. (Not as widely supported, supported in VSCode through my PR)
no setter
font4 String

Available on String, provided by the ChalkString extension

Alternative font 4. (Not as widely supported, supported in VSCode through my PR)
no setter
font5 String

Available on String, provided by the ChalkString extension

Alternative font 5. (Not as widely supported, supported in VSCode through my PR)
no setter
font6 String

Available on String, provided by the ChalkString extension

Alternative font 6. (Not as widely supported, supported in VSCode through my PR)
no setter
font7 String

Available on String, provided by the ChalkString extension

Alternative font 7. (Not as widely supported, supported in VSCode through my PR)
no setter
font8 String

Available on String, provided by the ChalkString extension

Alternative font 8. (Not as widely supported, supported in VSCode through my PR)
no setter
font9 String

Available on String, provided by the ChalkString extension

Alternative font 9. (Not as widely supported, supported in VSCode through my PR)
no setter
font10 String

Available on String, provided by the ChalkString extension

Alternative font 10. (Not as widely supported, supported in VSCode through my PR)
no setter
gray String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors gray (alternate name for bright black) (terminal dependent) linen
no setter
green String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors green (terminal dependent) linen
no setter
greenBright String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright green (terminal dependent) linen
no setter
grey String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors grey (alternate name for bright black) (terminal dependent) linen
no setter
hidden String

Available on String, provided by the ChalkString extension

hidden - Prints the text, but makes it invisible. (still copy and pasteable)
no setter
inverse String

Available on String, provided by the ChalkString extension

inverse- Inverse background and foreground colors.
no setter
invert String

Available on String, provided by the ChalkString extension

invert- alternate for inverse() - Inverse background and foreground colors.
no setter
italic String

Available on String, provided by the ChalkString extension

italic - Make text italic. (VSCode debug console supports,some other terminals)
no setter
magenta String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors magenta (terminal dependent) linen
no setter
magentaBright String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright magenta (terminal dependent) linen
no setter
normal String

Available on String, provided by the ChalkString extension

normal - Text with all attributes off
no setter
onBlack String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors black (terminal dependent) linen
no setter
onBlue String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors blue (terminal dependent) linen
no setter
onBrightBlack String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors bright black (terminal dependent) linen
no setter
onBrightBlue String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors bright blue (terminal dependent) linen
no setter
onBrightCyan String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors bright cyan (terminal dependent) linen
no setter
onBrightGreen String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors bright green (terminal dependent) linen
no setter
onBrightMagenta String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors bright magenta (terminal dependent) linen
no setter
onBrightRed String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors bright red (terminal dependent) linen
no setter
onBrightWhite String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors bright white (terminal dependent) linen
no setter
onBrightYellow String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors bright yellow (terminal dependent) linen
no setter
onCyan String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors cyan (terminal dependent) linen
no setter
onGray String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors gray (alternate name for bright black) (terminal dependent) linen
no setter
onGreen String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors green (terminal dependent) linen
no setter
onGrey String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors grey (alternate name for bright black) (terminal dependent) linen
no setter
onMagenta String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors magenta (terminal dependent) linen
no setter
onRed String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors red (terminal dependent) linen
no setter
onWhite String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors white (terminal dependent) linen
no setter
onYellow String

Available on String, provided by the ChalkString extension

Set background base 16 xterm colors yellow (terminal dependent) linen
no setter
overline String

Available on String, provided by the ChalkString extension

overlined (alternate name for overline) - Make text overlined. (Not as widely supported, supported in VSCode through my PR)
no setter
overlined String

Available on String, provided by the ChalkString extension

overlined (alternate name for overline) - Make text overlined. (Not as widely supported, supported in VSCode through my PR)
no setter

Available on String, provided by the ChalkString extension

rapidblink - Make text blink rapidly (>150 times per minute). (Not as widely supported, supported in VSCode through my PR)
no setter
red String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors red (terminal dependent) linen
no setter
redBright String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright red (terminal dependent) linen
no setter
reset String

Available on String, provided by the ChalkString extension

reset - Resets the current color chain.
no setter
strikethrough String

Available on String, provided by the ChalkString extension

no setter
strip String

Available on String, provided by the ChalkString extension

Strip all ANSI SGR commands from the target string and return the 'stripped' result string.
no setter
subscript String

Available on String, provided by the ChalkString extension

subscript - Subscript text. (Not as widely supported, supported in VSCode through my PR)
no setter
superscript String

Available on String, provided by the ChalkString extension

superscript - Superscript text. (Not as widely supported, supported in VSCode through my PR)
no setter
underline String

Available on String, provided by the ChalkString extension

underline - Make text underline. (Not as widely supported, supported in VSCode through my PR)
no setter
underlined String

Available on String, provided by the ChalkString extension

underlined (alternate name for underline) - Make text underline. (Not as widely supported, supported in VSCode through my PR)
no setter
visible String

Available on String, provided by the ChalkString extension

visible - Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic.
no setter
white String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors white (terminal dependent) linen
no setter
whiteBright String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright white (terminal dependent) linen
no setter
yellow String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors yellow (terminal dependent)linen
no setter
yellowBright String

Available on String, provided by the ChalkString extension

Set foreground base 16 xterm colors bright yellow (terminal dependent) linen
no setter

Methods

ansi(int ansicode) String

Available on String, provided by the ChalkString extension

Creates String with the foreground color specified by the ansi color escape code. https://en.wikipedia.org/wiki/ANSI_escape_code
ansi256(int ansicode256) String

Available on String, provided by the ChalkString extension

https://en.wikipedia.org/wiki/ANSI_escape_code
ansiSgr(dynamic openCode, dynamic closeCode) String

Available on String, provided by the ChalkString extension

https://en.wikipedia.org/wiki/ANSI_escape_code
bgAnsi(int ansicode) String

Available on String, provided by the ChalkString extension

Alternate name for onAnsi() (provided for legacy compatibility with JS Chalk)
bgAnsi256(int ansicode256) String

Available on String, provided by the ChalkString extension

Alternate name for onAnsi256() (provided for legacy compatibility with JS Chalk)
bgGreyscale(num greyscale) String

Available on String, provided by the ChalkString extension

Alternate name for onGreyscale() (provided for legacy compatibility with JS Chalk)
bgHex(dynamic hex) String

Available on String, provided by the ChalkString extension

Alternate name for onHex() (provided for legacy compatibility with JS Chalk).
bgHsl(num hue, num saturation, num lightness) String

Available on String, provided by the ChalkString extension

Alternate name for onHsl() (provided for legacy compatibility with JS Chalk)
bgHsv(num hue, num saturation, num value) String

Available on String, provided by the ChalkString extension

Alternate name for onHsv() (provided for legacy compatibility with JS Chalk)
bgHwb(num hue, num whiteness, num blackness) String

Available on String, provided by the ChalkString extension

Alternate name for onHwb() (provided for legacy compatibility with JS Chalk)
bgKeyword(String colorKeyword) String

Available on String, provided by the ChalkString extension

Alternate name for onKeyword() (provided for legacy compatibility with JS Chalk).
bgLab(num l, num a, num b) String

Available on String, provided by the ChalkString extension

Alternate name for onLab() (provided for legacy compatibility with JS Chalk)
bgRgb(num red, num green, num blue) String

Available on String, provided by the ChalkString extension

Alternate name for onRgb() (provided for legacy compatibility with JS Chalk).
bgRgb16m(num red, num green, num blue) String

Available on String, provided by the ChalkString extension

Alternate name for onRgb16m() (provided for legacy compatibility with JS Chalk).
bgXyz(num x, num y, num z) String

Available on String, provided by the ChalkString extension

Alternate name for onXyz() (provided for legacy compatibility with JS Chalk)
greyscale(num greyscale) String

Available on String, provided by the ChalkString extension

hex(dynamic hex) String

Available on String, provided by the ChalkString extension

Returns a String with the foreground color set to the passed in RGB Hex code. This dynamically accepts color hex codes as integer codes (0xAABBCC) or (0xABC) or as strings ('#AABBCC') or ('#ABC')
hsl(num hue, num saturation, num lightness) String

Available on String, provided by the ChalkString extension

Creates String with foreground color defined from HSL (Hue, Saturation and Lightness) color space parameters. https://en.wikipedia.org/wiki/HSL_and_HSV
hsv(num hue, num saturation, num value) String

Available on String, provided by the ChalkString extension

Creates String with foreground color defined from HSV (Hue, Saturation and Value) color space parameters. https://en.wikipedia.org/wiki/HSL_and_HSV
hwb(num hue, num whiteness, num blackness) String

Available on String, provided by the ChalkString extension

Creates String with foreground color defined from HWB (Hue, Whiteness and Blackness) color space parameters. https://en.wikipedia.org/wiki/HWB_color_model
keyword(String colorKeyword) String

Available on String, provided by the ChalkString extension

Returns a String with the foreground color set to the color represented by the passed in color keyword. This accepts all of the standard X11/CSS/SVG color names, and the user can extend the list of accepted color keywords using the addColorKeywordRgb() and addColorKeywordHex() methods
lab(num l, num a, num b) String

Available on String, provided by the ChalkString extension

Creates String with foreground color defined from lab color space parameters. https://en.wikipedia.org/wiki/CIELAB_color_space#CIELAB
onAnsi(int ansicode) String

Available on String, provided by the ChalkString extension

Creates String with the background color specified by the ansi color escape code. https://en.wikipedia.org/wiki/ANSI_escape_code
onAnsi256(int ansicode256) String

Available on String, provided by the ChalkString extension

https://en.wikipedia.org/wiki/ANSI_escape_code
onGreyscale(num greyscale) String

Available on String, provided by the ChalkString extension

onHex(dynamic hex) String

Available on String, provided by the ChalkString extension

Returns a String with the background color set to the passed in RGB Hex code. This dynamically accepts color hex codes as integer codes (0xAABBCC) or (0xABC) or as strings ('#AABBCC') or ('#ABC')
onHsl(num hue, num saturation, num lightness) String

Available on String, provided by the ChalkString extension

Creates String with background color defined from HSL (Hue, Saturation and Lightness) color space parameters. https://en.wikipedia.org/wiki/HSL_and_HSV
onHsv(num hue, num saturation, num value) String

Available on String, provided by the ChalkString extension

Creates chalk with background color defined from HSV (Hue, Saturation and Value) color space parameters. https://en.wikipedia.org/wiki/HSL_and_HSV
onHwb(num hue, num whiteness, num blackness) String

Available on String, provided by the ChalkString extension

Creates String with background color defined from HWB (Hue, Whiteness and Blackness) color space parameters. https://en.wikipedia.org/wiki/HWB_color_model
onKeyword(String colorKeyword) String

Available on String, provided by the ChalkString extension

Returns a String with the background color set to the color represented by the passed in color keyword. This accepts all of the standard X11/CSS/SVG color names, and the user can extend the list of accepted color keywords using the addColorKeywordRgb() and addColorKeywordHex() methods
onLab(num l, num a, num b) String

Available on String, provided by the ChalkString extension

Creates String with background color defined from lab color space parameters. https://en.wikipedia.org/wiki/CIELAB_color_space#CIELAB
onRgb(num red, num green, num blue) String

Available on String, provided by the ChalkString extension

Create String with a background color with the specified RGB values.
onRgb16m(num red, num green, num blue) String

Available on String, provided by the ChalkString extension

Create String with a background color with the specified RGB values (forces using ANSI 16m SGR codes, even if level is not 3).
onXyz(num x, num y, num z) String

Available on String, provided by the ChalkString extension

Creates String with background color defined from XYZ color space parameters. https://en.wikipedia.org/wiki/CIE_1931_color_space
rgb(num red, num green, num blue) String

Available on String, provided by the ChalkString extension

Create String with a foreground color with the specified RGB values.
rgb16m(num red, num green, num blue) String

Available on String, provided by the ChalkString extension

Create String with a foreground color with the specified RGB values (forces using ANSI 16m SGR codes, even if level is not 3).
underlineRgb(num red, num green, num blue) String

Available on String, provided by the ChalkString extension

Create String with an underline of the the specified RGB color WARNING: on some consoles without support for this, such as Android Studio, using this will prevent ALL styles of the Chalk from appearing
underlineRgb16m(num red, num green, num blue) String

Available on String, provided by the ChalkString extension

Create String with an underline of the the specified RGB color (forces using ANSI 16m SGR codes, even if level is not 3) WARNING: on some consoles without support for this, such as Android Studio, using this will prevent ALL styles of the Chalk from appearing
wrap(String prefix, String suffix) String

Available on String, provided by the ChalkString extension

Wrap this chalk with specified prefix and suffix strings.
xyz(num x, num y, num z) String

Available on String, provided by the ChalkString extension

Creates String with foreground color defined from XYZ color space parameters. https://en.wikipedia.org/wiki/CIE_1931_color_space