Expand description
Named styles: the palette of the Python UI plus the markdown element styles.
Everything here is a plain anstyle::Style constant, so the values are Copy, can be used
in const contexts and are only turned into escape sequences when a renderer decides that
colour is wanted (see crate::ui::Term::color).
The palette follows display.py: cyan for instructions, yellow for hints, green for success,
red for failures and blocked commands, dim for secondary notes and violet for commands that
are mentioned inside such notes.
Constants§
- BLOCKQUOTE
- Block quotes (the
▌bar and the quoted text). - BOLD
- Bold text.
- BOLD_
CYAN - Bold cyan: panel titles of instruction panels.
- BOLD_
GREEN - Bold green: success messages.
- BOLD_
RED - Bold red: failure messages.
- BOLD_
YELLOW - Bold yellow.
- CODE_
BLOCK - Fenced and indented code blocks: plain cyan, calmer than the bold cyan of inline code and readable on dark and light terminals alike.
- CYAN
- Cyan: instruction panels.
- DIM
- Dimmed (faint) text, used for secondary notes.
- DIM_
BOLD - Dim and bold, for emphasis inside a dim note.
- DIM_
VIOLET - Dim and violet, for a command inside a dim note (
[dim]… [violet]cmd[/violet][/dim]). - EMPHASIS
*emphasis*.- GREEN
- Green: success.
- H1
- Level 1 heading text.
- H2
- Level 2 heading text.
- H3
- Level 3 heading text.
- H4
- Level 4 heading text.
- H5
- Level 5 heading text.
- H6
- Level 6 heading text.
- HEADING_
RULE - The
────line that follows a level 1 or 2 heading (the text itself is underlined already). - INLINE_
CODE `inline code`.- LINK
- Link text.
- LIST_
MARKER - Bullets and list numbers.
- MAGENTA
- Magenta.
- MUTED
- Thematic breaks (
***) and link targets. - PLAIN
- No styling at all.
- RED
- Red: failures and blocked commands.
- STRIKETHROUGH
~~strikethrough~~(only produced when the extension is enabled).- STRONG
**strong**.- VIOLET
- Violet (256-colour index 177, the colour Rich calls
violet): commands inside notes. - YELLOW
- Yellow: hints and warnings.
Functions§
- combine
- Lays
topoverbase, like Rich’sStyle.__add__: colours oftopwin where it sets one, text effects are the union of both.