class_docstr: A terminal style.
  
  A terminal style consists of a color (`color`), a background color (`bgcolor`), and a number of attributes, such
  as bold, italic etc. The attributes have 3 states: they can either be on
  (``True``), off (``False``), or not set (``None``).
  
  Args:
      color (Union[Color, str], optional): Color of terminal text. Defaults to None.
      bgcolor (Union[Color, str], optional): Color of terminal background. Defaults to None.
      bold (bool, optional): Enable bold text. Defaults to None.
      dim (bool, optional): Enable dim text. Defaults to None.
      italic (bool, optional): Enable italic text. Defaults to None.
      underline (bool, optional): Enable underlined text. Defaults to None.
      blink (bool, optional): Enabled blinking text. Defaults to None.
      blink2 (bool, optional): Enable fast blinking text. Defaults to None.
      reverse (bool, optional): Enabled reverse text. Defaults to None.
      conceal (bool, optional): Enable concealed text. Defaults to None.
      strike (bool, optional): Enable strikethrough text. Defaults to None.
      underline2 (bool, optional): Enable doubly underlined text. Defaults to None.
      frame (bool, optional): Enable framed text. Defaults to None.
      encircle (bool, optional): Enable encircled text. Defaults to None.
      overline (bool, optional): Enable overlined text. Defaults to None.
      link (str, link): Link URL. Defaults to None.
class_docstr_tok: ["A","terminal","style",".","A","terminal","style","consists","of","a","color","(","`","color","`",")",",","a","background","color","(","`","bgcolor","`",")",",","and","a","number","of","attributes",",","such","as","bold",",","italic","etc",".","The","attributes","have","3","states",":","they","can","either","be","on","(","``","True","``",")",",","off","(","``","False","``",")",",","or","not","set","(","``","None","``",")",".","Args",":","color","(","Union","[","Color",",","str","]",",","optional",")",":","Color","of","terminal","text",".","Defaults","to","None",".","bgcolor","(","Union","[","Color",",","str","]",",","optional",")",":","Color","of","terminal","background",".","Defaults","to","None",".","bold","(","bool",",","optional",")",":","Enable","bold","text",".","Defaults","to","None",".","dim","(","bool",",","optional",")",":","Enable","dim","text",".","Defaults","to","None",".","italic","(","bool",",","optional",")",":","Enable","italic","text",".","Defaults","to","None",".","underline","(","bool",",","optional",")",":","Enable","underlined","text",".","Defaults","to","None",".","blink","(","bool",",","optional",")",":","Enabled","blinking","text",".","Defaults","to","None",".","blink2","(","bool",",","optional",")",":","Enable","fast","blinking","text",".","Defaults","to","None",".","reverse","(","bool",",","optional",")",":","Enabled","reverse","text",".","Defaults","to","None",".","conceal","(","bool",",","optional",")",":","Enable","concealed","text",".","Defaults","to","None",".","strike","(","bool",",","optional",")",":","Enable","strikethrough","text",".","Defaults","to","None",".","underline2","(","bool",",","optional",")",":","Enable","doubly","underlined","text",".","Defaults","to","None",".","frame","(","bool",",","optional",")",":","Enable","framed","text",".","Defaults","to","None",".","encircle","(","bool",",","optional",")",":","Enable","encircled","text",".","Defaults","to","None",".","overline","(","bool",",","optional",")",":","Enable","overlined","text",".","Defaults","to","None",".","link","(","str",",","link",")",":","Link","URL",".","Defaults","to","None","."]
code: def __init__(
      self,
      *,
      color: Optional[Union[Color, str]] = None,
      bgcolor: Optional[Union[Color, str]] = None,
      bold: Optional[bool] = None,
      dim: Optional[bool] = None,
      italic: Optional[bool] = None,
      underline: Optional[bool] = None,
      blink: Optional[bool] = None,
      blink2: Optional[bool] = None,
      reverse: Optional[bool] = None,
      conceal: Optional[bool] = None,
      strike: Optional[bool] = None,
      underline2: Optional[bool] = None,
      frame: Optional[bool] = None,
      encircle: Optional[bool] = None,
      overline: Optional[bool] = None,
      link: Optional[str] = None,
      meta: Optional[Dict[str, Any]] = None,
  ):
      self._ansi: Optional[str] = None
      self._style_definition: Optional[str] = None
  
      def _make_color(color: Union[Color, str]) -> Color:
          return (
              color if isinstance(color, Color) else Color.parse(color)
          )
  
      self._color = None if color is None else _make_color(color)
      self._bgcolor = None if bgcolor is None else _make_color(bgcolor)
      self._set_attributes = sum(
          (
              bold is not None,
              dim is not None and 2,
              italic is not None and 4,
              underline is not None and 8,
              blink is not None and 16,
              blink2 is not None and 32,
              reverse is not None and 64,
              conceal is not None and 128,
              strike is not None and 256,
              underline2 is not None and 512,
              frame is not None and 1024,
              encircle is not None and 2048,
              overline is not None and 4096,
          )
      )
      self._attributes = (
          sum(
              (
                  bold and 1 or 0,
                  dim and 2 or 0,
                  italic and 4 or 0,
                  underline and 8 or 0,
                  blink and 16 or 0,
                  blink2 and 32 or 0,
                  reverse and 64 or 0,
                  conceal and 128 or 0,
                  strike and 256 or 0,
                  underline2 and 512 or 0,
                  frame and 1024 or 0,
                  encircle and 2048 or 0,
                  overline and 4096 or 0,
              )
          )
          if self._set_attributes
          else 0
      )
  
      self._link = link
      self._meta = None if meta is None else dumps(meta)
      self._link_id = (
          f"{randint(0, 999999)}{hash(self._meta)}"
          if (link or meta)
          else ""
      )
      self._hash: Optional[int] = None
      self._null = not (
          self._set_attributes or color or bgcolor or link or meta
      )
  
imports: import sys
  from functools import lru_cache
  from marshal import dumps, loads
  from random import randint
  from typing import Any, Dict, Iterable, List, Optional, Type, Union, cast
  from .None import errors
  from .color import Color, ColorParseError, ColorSystem, blend_rgb
  from .repr import Result, rich_repr
  from .terminal_theme import DEFAULT_TERMINAL_THEME, TerminalTheme
label_desc: Use image node_id 1 to create a new Style object  with example: obj = Style()