# ``twisted`.`python`.`_textattributes`.`_ColorAttr``

class documentation

`class _ColorAttr(_Attribute): (source)`

Known subclasses: `twisted.python._textattributes._BackgroundColorAttr`, `twisted.python._textattributes._ForegroundColorAttr`

View In Hierarchy

Generic color attribute.

Parameters
color | Color value.
ground | Foreground or background attribute name.

Method | `__init__` | Undocumented
Method | `serialize` | Serialize the text attribute and its children.
Class Variable | `compareAttributes` | Undocumented
Instance Variable | `color` | Undocumented
Instance Variable | `ground` | Undocumented

Inherited from `_Attribute`:

Method | `__getitem__` | Undocumented
Method | `__repr__` | Undocumented
Instance Variable | `children` | Child attributes.

Inherited from `FancyEqMixin` (via `_Attribute`):

Method | `__eq__` | Undocumented
Method | `__ne__` | Undocumented

def __init__(self, color, ground): (source)
overrides `twisted.python._textattributes._Attribute.__init__`
overridden in `twisted.python._textattributes._BackgroundColorAttr`, `twisted.python._textattributes._ForegroundColorAttr`

Undocumented

def serialize(self, write, attrs, attributeRenderer): (source)
overrides `twisted.python._textattributes._Attribute.serialize`
Serialize the text attribute and its children.

Parameters
write | `callable`, taking one `str` argument, called to output a single text attribute at a time.
attrs | A formatting state instance used to determine how to serialize the attribute children.
attributeRenderer:`str` | Name of the method on attrs that should be called to render the attributes during serialization. Defaults to `'toVT102'`.

compareAttributes: `tuple[str, ...]` = (source)
overrides `twisted.python._textattributes._Attribute.compareAttributes`

Undocumented

color = (source)

Undocumented

ground = (source)

Undocumented