Custom Text Effects and Styling#
Effect
#
Enumerable class of all available effects.
Options:
Effect | Effect Code | Reset Code | Example |
---|---|---|---|
Bold | Effect.BOLD | Effect.BOLD_OFF | This is BOLD |
Dim | Effect.DIM | Effect.DIM_OFF | This is DIMMED |
Underline | Effect.UNDERLINE | Effect.UNDERLINE_OFF | This is UNDERLINED |
Blink | Effect.BLINK | Effect.BLINK_OFF | This is BLINKING |
Reverse | Effect.REVERSE | Effect.REVERSE_OFF | This is REVERSED |
Hide | Effect.HIDE | Effect.HIDE_OFF | This is HIDDEN |
- | - | Effect.OFF | - |
Example:
Example
Python | |
---|---|
How it appears in the terminal:
% I want underlined text
% I want emphasized text
Tip
Similar to Color.OFF
, remember to turn off an effect with the relevant reset option (e.g Effect.BOLD_OFF
, Effect.DIM_OFF
, etc. or even just Effect.OFF
) every time you want to revert back to the default terminal text style. Otherwise, the effect may spill over and into other terminal messages.