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

Public Member Functions

 ColorRGB (float red, float green, float blue)
 
ColorHSV ToHSV ()
 
ColorRGB ToRGB ()
 
float Dot (in ColorRGB other)
 
ColorRGB Sqrt ()
 
void From< TColor > (in TColor color)
 
override string ToString ()
 
float Length ()
 

Static Public Member Functions

static ColorRGB operator+ (in ColorRGB a, in ColorRGB b)
 
static ColorRGB operator- (in ColorRGB a, in ColorRGB b)
 
static ColorRGB operator* (in ColorRGB a, in ColorRGB b)
 
static ColorRGB operator* (in ColorRGB c, float scale)
 
static ColorRGB operator* (float scale, in ColorRGB c)
 
static ColorRGB operator/ (in ColorRGB c, float scale)
 

Properties

float Red [get, set]
 
float Green [get, set]
 
float Blue [get, set]
 

Detailed Description

Color represented as a vector of (Red,Green,Blue) components in range [0.0, 1.0].

Member Function Documentation

◆ From< TColor >()

void TermColor.ColorRGB.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 

◆ Sqrt()

ColorRGB TermColor.ColorRGB.Sqrt ( )
inline

Computes square root of Red, Green and Blue.

Returns
The square root color.

◆ ToHSV()

ColorHSV TermColor.ColorRGB.ToHSV ( )
inline

Convert this color to its HSV equivalent.

Returns

Implements TermColor.IColor.

◆ ToRGB()

ColorRGB TermColor.ColorRGB.ToRGB ( )
inline

Convert this color to its RGB equivalent

Returns

Implements TermColor.IColor.


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