Base#
Color #
Color decorator
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| content | Any | string to be colored | required | 
| fg | ColorTypes | font color (or) foreground color | None | 
| bg | BgColorTypes | background color | None | 
| style | FontTypes | font style | None | 
        properties
  
  
      property
  
#
  Properties of the string/font
Returns:
| Type | Description | 
|---|---|
| Tuple[ColorTypes, BgColorTypes, FontTypes] | foreground, background color and font style | 
__add__ #
Concatenates two colors
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| color | Any | color decorator or string | required | 
Returns:
| Type | Description | 
|---|---|
| ColorString | colored string | 
Raises:
| Type | Description | 
|---|---|
| ValueError | if the color is not  | 
__eq__ #
Compares the two Colors properties and values
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| color | Any | color decorator or normal string | required | 
Returns:
| Type | Description | 
|---|---|
| bool | 
 | 
Raises:
| Type | Description | 
|---|---|
| ValueError | if the color is not  | 
replace #
Replaces the properties
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| value | Any | string to be colored | MISSING | 
| fg | ColorTypes | font color (or) foreground color | MISSING | 
| bg | BgColorTypes | background color | MISSING | 
| style | FontTypes | font style | MISSING | 
RGB #
RGB color decorator
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| red | int | ranges from 0 to 255 | required | 
| green | int | ranges from 0 to 255 | required | 
| blue | int | ranges from 0 to 255 | required | 
Raises:
| Type | Description | 
|---|---|
| ValueError | if the rgb color code is invalid | 
        value
  
  
      property
  
#
  Returns:
| Name | Type | Description | 
|---|---|---|
| code | Tuple[int, int, int] | rgb color code | 
Template #
Color/Font template
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| fg | ColorTypes | font color (or) foreground color | None | 
| bg | BgColorTypes | background color | None | 
| style | FontTypes | font style | None | 
Raises:
| Type | Description | 
|---|---|
| ValueError | if no argument is passed | 
Examples:
__call__ #
color decorator
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| content | Any | string to be colored | required | 
Returns:
| Type | Description | 
|---|---|
| Color | color decorator | 
__eq__ #
compares the two templates
:param template:
Returns:
| Type | Description | 
|---|---|
| bool | 
 | 
Raises:
| Type | Description | 
|---|---|
| ValueError | if the color is not  | 
edit #
Edits the template properties
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| fg | ColorTypes | font color (or) foreground color | MISSING | 
| bg | BgColorTypes | background color | MISSING | 
| style | FontTypes | font style | MISSING |