Colours

class prompty.colours.Colours(container)
\startColour[fgcolour][bgcolour][style]

Start a colour block.

Parameters:
  • fgcolour – The foreground colour.
  • bgcolour – The background colour.
  • style – The character style.
\stopColour

Stop a colour block.

Parameters:wrap – Wrap the code in additional characters to signify non-printing characters are contained
\black[style]{literal}

Set black foreground colour for literal.

Parameters:style – The character style.
\blackbg[style]{literal}

Set black background colour for literal.

Parameters:style – The character style.
\blink{literal}

Set the style to blink for literal.

\blue[style]{literal}

Set blue foreground colour for literal.

Parameters:style – The character style.
\bluebg[style]{literal}

Set blue background colour for literal.

Parameters:style – The character style.
\bold{literal}

Set the style to bold for literal.

\bright{literal}

Set the pallet colour to bright for literal.

\colour[fgcolour][bgcolour][style]{literal}

Wrap the string literal in a colour block. The colour is stopped when literal ends.

Parameters:
  • fgcolour – The foreground colour.
  • bgcolour – The background colour.
  • style – The character style.
\cyan[style]{literal}

Set cyan foreground colour for literal.

Parameters:style – The character style.
\cyanbg[style]{literal}

Set cyan background colour for literal.

Parameters:style – The character style.
\darkgrey[style]{literal}

Set darkgrey foreground colour for literal.

Parameters:style – The character style.
\darkgreybg[style]{literal}

Set darkgrey background colour for literal.

Parameters:style – The character style.
\default[style]{literal}

Set default foreground colour for literal.

Parameters:style – The character style.
\defaultbg[style]{literal}

Set default background colour for literal.

Parameters:style – The character style.
\dim{literal}

Set the style to dim for literal.

\dim1{literal}

Set the pallet colour to dim1 for literal.

\dim2{literal}

Set the pallet colour to dim2 for literal.

\dim3{literal}

Set the pallet colour to dim3 for literal.

\error{literal}

Set the pallet colour to error for literal.

\green[style]{literal}

Set green foreground colour for literal.

Parameters:style – The character style.
\greenbg[style]{literal}

Set green background colour for literal.

Parameters:style – The character style.
\info1{literal}

Set the pallet colour to info1 for literal.

\info2{literal}

Set the pallet colour to info2 for literal.

\info3{literal}

Set the pallet colour to info3 for literal.

\inverted{literal}

Set the style to inverted for literal.

\italic{literal}

Set the style to italic for literal.

\lightblue[style]{literal}

Set lightblue foreground colour for literal.

Parameters:style – The character style.
\lightbluebg[style]{literal}

Set lightblue background colour for literal.

Parameters:style – The character style.
\lightcyan[style]{literal}

Set lightcyan foreground colour for literal.

Parameters:style – The character style.
\lightcyanbg[style]{literal}

Set lightcyan background colour for literal.

Parameters:style – The character style.
\lightgreen[style]{literal}

Set lightgreen foreground colour for literal.

Parameters:style – The character style.
\lightgreenbg[style]{literal}

Set lightgreen background colour for literal.

Parameters:style – The character style.
\lightgrey[style]{literal}

Set lightgrey foreground colour for literal.

Parameters:style – The character style.
\lightgreybg[style]{literal}

Set lightgrey background colour for literal.

Parameters:style – The character style.
\lightmagenta[style]{literal}

Set lightmagenta foreground colour for literal.

Parameters:style – The character style.
\lightmagentabg[style]{literal}

Set lightmagenta background colour for literal.

Parameters:style – The character style.
\lightred[style]{literal}

Set lightred foreground colour for literal.

Parameters:style – The character style.
\lightredbg[style]{literal}

Set lightred background colour for literal.

Parameters:style – The character style.
\lightyellow[style]{literal}

Set lightyellow foreground colour for literal.

Parameters:style – The character style.
\lightyellowbg[style]{literal}

Set lightyellow background colour for literal.

Parameters:style – The character style.
\magenta[style]{literal}

Set magenta foreground colour for literal.

Parameters:style – The character style.
\magentabg[style]{literal}

Set magenta background colour for literal.

Parameters:style – The character style.
\normal{literal}

Set the style to normal for literal.

\red[style]{literal}

Set red foreground colour for literal.

Parameters:style – The character style.
\redbg[style]{literal}

Set red background colour for literal.

Parameters:style – The character style.
\underline{literal}

Set the style to underline for literal.

\warning{literal}

Set the pallet colour to warning for literal.

\white[style]{literal}

Set white foreground colour for literal.

Parameters:style – The character style.
\whitebg[style]{literal}

Set white background colour for literal.

Parameters:style – The character style.
\yellow[style]{literal}

Set yellow foreground colour for literal.

Parameters:style – The character style.
\yellowbg[style]{literal}

Set yellow background colour for literal.

Parameters:style – The character style.