Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
pip._vendor.rich.color.Color Class Reference
Inheritance diagram for pip._vendor.rich.color.Color:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.rich.color.Color:
Collaboration graph
[legend]

Public Member Functions

"Text" __rich__ (self)
 
Result __rich_repr__ (self)
 
ColorSystem system (self)
 
bool is_system_defined (self)
 
bool is_default (self)
 
ColorTriplet get_truecolor (self, Optional["TerminalTheme"] theme=None, bool foreground=True)
 
"Color" from_ansi (cls, int number)
 
"Color" from_triplet (cls, "ColorTriplet" triplet)
 
"Color" from_rgb (cls, float red, float green, float blue)
 
"Color" default (cls)
 
"Color" parse (cls, str color)
 
Tuple[str,...] get_ansi_codes (self, bool foreground=True)
 
"Color" downgrade (self, ColorSystem system)
 

Public Attributes

 number
 
 triplet
 
 type
 
 name
 
 system
 

Static Public Attributes

str name
 
ColorType type
 
Optional number = None
 
Optional triplet = None
 

Detailed Description

Terminal color definition.

Member Function Documentation

◆ __rich__()

"Text" pip._vendor.rich.color.Color.__rich__ (   self)
Displays the actual color if Rich printed.

◆ default()

"Color" pip._vendor.rich.color.Color.default (   cls)
Get a Color instance representing the default color.

Returns:
    Color: Default color.

◆ downgrade()

"Color" pip._vendor.rich.color.Color.downgrade (   self,
ColorSystem  system 
)
Downgrade a color system to a system with fewer colors.

◆ from_ansi()

"Color" pip._vendor.rich.color.Color.from_ansi (   cls,
int  number 
)
Create a Color number from it's 8-bit ansi number.

Args:
    number (int): A number between 0-255 inclusive.

Returns:
    Color: A new Color instance.

◆ from_rgb()

"Color" pip._vendor.rich.color.Color.from_rgb (   cls,
float  red,
float  green,
float  blue 
)
Create a truecolor from three color components in the range(0->255).

Args:
    red (float): Red component in range 0-255.
    green (float): Green component in range 0-255.
    blue (float): Blue component in range 0-255.

Returns:
    Color: A new color object.

◆ from_triplet()

"Color" pip._vendor.rich.color.Color.from_triplet (   cls,
"ColorTriplet"  triplet 
)
Create a truecolor RGB color from a triplet of values.

Args:
    triplet (ColorTriplet): A color triplet containing red, green and blue components.

Returns:
    Color: A new color object.

◆ get_ansi_codes()

Tuple[str, ...] pip._vendor.rich.color.Color.get_ansi_codes (   self,
bool   foreground = True 
)
Get the ANSI escape codes for this color.

◆ get_truecolor()

ColorTriplet pip._vendor.rich.color.Color.get_truecolor (   self,
Optional["TerminalTheme"]   theme = None,
bool   foreground = True 
)
Get an equivalent color triplet for this color.

Args:
    theme (TerminalTheme, optional): Optional terminal theme, or None to use default. Defaults to None.
    foreground (bool, optional): True for a foreground color, or False for background. Defaults to True.

Returns:
    ColorTriplet: A color triplet containing RGB components.

◆ is_default()

bool pip._vendor.rich.color.Color.is_default (   self)
Check if the color is a default color.

◆ is_system_defined()

bool pip._vendor.rich.color.Color.is_system_defined (   self)
Check if the color is ultimately defined by the system.

◆ parse()

"Color" pip._vendor.rich.color.Color.parse (   cls,
str  color 
)
Parse a color definition.

◆ system()

ColorSystem pip._vendor.rich.color.Color.system (   self)
Get the native color system for this color.

The documentation for this class was generated from the following file: