ANSI coloring scheme.
AnsiFormatter
#A formatter for the ANSI coloring scheme.
Inherits BaseFormatter
.
color(text, color)
staticmethod
#Applies color
to a string of text
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text | str | The subject text. | required |
color | Tuple[int, int, int] | The | required |
Returns:
Type | Description |
---|---|
str | The colored text. |
picharsso/format/ansi.py
15 16 17 | |
translate(text_matrix)
staticmethod
#Applies translatations to text_matrix
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text_matrix | numpy.ndarray | The subject text matrix, with | required |
Returns:
Type | Description |
---|---|
numpy.ndarray | The translated text_matrix. |
picharsso/format/ansi.py
19 20 21 | |
unify(text_matrix)
staticmethod
#Formats a text_matrix
into a single string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text_matrix | numpy.ndarray | The subject text matrix, with | required |
Returns:
Type | Description |
---|---|
str | The formatted string of text art. |
picharsso/format/ansi.py
23 24 25 | |