Columns Reference¶
Bases: Gradient
A Rich columns convenience constructor with gradient rendering.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
renderables
|
Iterable[RenderableType]
|
Renderables to arrange in columns. |
required |
width
|
int | None
|
Optional desired column width. |
None
|
padding
|
PaddingDimensions
|
Padding around column cells. |
(0, 1)
|
columns_expand
|
bool
|
Whether Rich columns expand to full width. |
False
|
equal
|
bool
|
Whether columns are equal-sized. |
False
|
column_first
|
bool
|
Whether to lay out top-to-bottom first. |
False
|
right_to_left
|
bool
|
Whether columns start from the right. |
False
|
align
|
AlignMethod | None
|
Column content alignment. |
None
|
title
|
TextType | None
|
Optional title. |
None
|
colors
|
Optional[Sequence[ColorType]]
|
Foreground gradient color stops. |
None
|
bg_colors
|
Optional[Sequence[ColorType]]
|
Background gradient color stops. |
None
|
rainbow
|
bool
|
Whether to generate a rainbow palette. |
False
|
hues
|
int
|
Number of auto-generated hues. |
5
|
repeat_scale
|
float
|
Scale factor controlling gradient repeats. |
2.0
|
expand
|
bool
|
Whether the gradient frame expands. |
True
|
justify
|
AlignMethod
|
Horizontal alignment. |
'left'
|
vertical_justify
|
VerticalAlignMethod
|
Vertical alignment. |
'middle'
|
console
|
Optional[Console]
|
Optional Rich console. |
None
|
highlight_words
|
Optional[HighlightWordsType]
|
Word highlight configuration. |
None
|
highlight_regex
|
Optional[HighlightRegexType]
|
Regex highlight configuration. |
None
|
Source code in src/rich_gradient/columns.py
columns
property
¶
Return the underlying Rich columns renderable.
__init__(renderables, *, width=None, padding=(0, 1), columns_expand=False, equal=False, column_first=False, right_to_left=False, align=None, title=None, colors=None, bg_colors=None, rainbow=False, hues=5, repeat_scale=2.0, expand=True, justify='left', vertical_justify='middle', console=None, highlight_words=None, highlight_regex=None)
¶
Initialize gradient-enabled Rich columns.