1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
# ColorPair
*Module*: `terminaltexteffects.utils.graphics`
## Basic Usage
ColorPair objects are used to represent a foreground and background color pair.
### Usage
```python
import terminaltexteffects as tte
color_pair = tte.ColorPair(fg=tte.Color("#FF0000"), bg=tte.Color("#00FF00"))
```
### Alternate Signature
Colors can be specified using strings or integers. Color objects will be created automatically.
```python
import terminaltexteffects as tte
color_pair = tte.ColorPair("#FF0000", "#00FF00")
```
`fg` and/or `bg` are optional and default to `None`.
### Printing ColorPairs
ColorPair objects can be printed to see the resulting colors.

---
## ColorPair Reference
::: terminaltexteffects.utils.graphics.ColorPair
|