💻 TermColor User Manual
Public Member Functions | Static Public Member Functions | Properties | List of all members
TermColor.Color8 Struct Reference
Inheritance diagram for TermColor.Color8:
Inheritance graph
[legend]
Collaboration diagram for TermColor.Color8:
Collaboration graph
[legend]

Public Member Functions

 Color8 (byte colorId)
 
 Color8 (byte r, byte g, byte b)
 
ColorHSV ToHSV ()
 
ColorRGB ToRGB ()
 
override bool Equals (object other)
 
override int GetHashCode ()
 
void From< TColor > (in TColor color)
 

Static Public Member Functions

static bool operator== (in Color8 a, in Color8 b)
 
static bool operator!= (in Color8 a, in Color8 b)
 

Properties

byte Color [get, set]
 
string Foreground [get]
 
string Background [get]
 
- Properties inherited from TermColor.ANSIColor
string Foreground [get]
 
string Background [get]
 

Detailed Description

A color from 256-color palette.

Constructor & Destructor Documentation

◆ Color8()

TermColor.Color8.Color8 ( byte  r,
byte  g,
byte  b 
)
inline

Create a color from RGB

Parameters
rRed component (in range 0 to 5)
gGreen component (in range 0 to 5)
bBlue component (in range 0 to 5)

Member Function Documentation

◆ From< TColor >()

void TermColor.Color8.From< TColor > ( in TColor  color)
inline

Change this color to approximate color .

Template Parameters
TColorType of the color.
Parameters
colorThe color to approximate.

Implements TermColor.IColor.

Type Constraints
TColor :IColor 

◆ ToHSV()

ColorHSV TermColor.Color8.ToHSV ( )
inline

Convert this color to its HSV equivalent.

Returns

Implements TermColor.IColor.

◆ ToRGB()

ColorRGB TermColor.Color8.ToRGB ( )
inline

Convert this color to its RGB equivalent

Returns

Implements TermColor.IColor.


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