C# 클래스 ScreenToGif.Util.ColorExtensions

파일 보기 프로젝트 열기: dbremner/ScreenToGif

공개 메소드들

메소드 설명
ClosestColorHsb ( List colors, Color target ) : int

Weighed distance using hue, saturation and brightness.

ClosestColorHue ( List colors, Color target ) : int

Closest match for hues only.

ClosestColorRgb ( List colors, Color target ) : int

Closest match in RGB space.

ColorDiff ( Color c1, Color c2 ) : int

Gets the distance in the RGB space.

ColorNum ( Color c ) : float
ConvertHsvToRgb ( double h, double s, double v, double alpha ) : Color

Converts an HSV color to an RGB color.

ConvertRgbToHsv ( int r, int b, int g ) : HsvColor

Converts an RGB color to an HSV color

ConvertRgbToHsv ( this color ) : HsvColor

Converts an RGB color to an HSV color

GenerateHsvSpectrum ( ) : List

Generates a list of colors with hues ranging from 0-360 and a saturation and value of 1.

GetBrightness ( this c ) : int
GetBrightness2 ( this c ) : double
GetBrightness3 ( this color ) : float
GetHue ( this color ) : float
GetHueDistance ( float hue1, float hue2 ) : float

Gets the distance between two hues.

GetLuminance ( Color c ) : float

Color brightness as perceived.

GetSaturation ( this color ) : float
IsEnoughContrast ( this color1, Color color2 ) : bool

메소드 상세

ClosestColorHsb() 공개 정적인 메소드

Weighed distance using hue, saturation and brightness.
public static ClosestColorHsb ( List colors, Color target ) : int
colors List
target Color
리턴 int

ClosestColorHue() 공개 정적인 메소드

Closest match for hues only.
public static ClosestColorHue ( List colors, Color target ) : int
colors List
target Color
리턴 int

ClosestColorRgb() 공개 정적인 메소드

Closest match in RGB space.
public static ClosestColorRgb ( List colors, Color target ) : int
colors List
target Color
리턴 int

ColorDiff() 공개 정적인 메소드

Gets the distance in the RGB space.
public static ColorDiff ( Color c1, Color c2 ) : int
c1 Color Color 1
c2 Color Color 2
리턴 int

ColorNum() 공개 정적인 메소드

public static ColorNum ( Color c ) : float
c Color
리턴 float

ConvertHsvToRgb() 공개 정적인 메소드

Converts an HSV color to an RGB color.
public static ConvertHsvToRgb ( double h, double s, double v, double alpha ) : Color
h double Hue
s double Saturation
v double Value
alpha double Alpha
리턴 Color

ConvertRgbToHsv() 공개 정적인 메소드

Converts an RGB color to an HSV color
public static ConvertRgbToHsv ( int r, int b, int g ) : HsvColor
r int Red
b int Blue
g int Green
리턴 ScreenToGif.Controls.HsvColor

ConvertRgbToHsv() 공개 정적인 메소드

Converts an RGB color to an HSV color
public static ConvertRgbToHsv ( this color ) : HsvColor
color this Color
리턴 ScreenToGif.Controls.HsvColor

GenerateHsvSpectrum() 공개 정적인 메소드

Generates a list of colors with hues ranging from 0-360 and a saturation and value of 1.
public static GenerateHsvSpectrum ( ) : List
리턴 List

GetBrightness() 공개 정적인 메소드

public static GetBrightness ( this c ) : int
c this
리턴 int

GetBrightness2() 공개 정적인 메소드

public static GetBrightness2 ( this c ) : double
c this
리턴 double

GetBrightness3() 공개 정적인 메소드

public static GetBrightness3 ( this color ) : float
color this
리턴 float

GetHue() 공개 정적인 메소드

public static GetHue ( this color ) : float
color this
리턴 float

GetHueDistance() 공개 정적인 메소드

Gets the distance between two hues.
public static GetHueDistance ( float hue1, float hue2 ) : float
hue1 float Hue 1
hue2 float Hue 2
리턴 float

GetLuminance() 공개 정적인 메소드

Color brightness as perceived.
public static GetLuminance ( Color c ) : float
c Color The Color
리턴 float

GetSaturation() 공개 정적인 메소드

public static GetSaturation ( this color ) : float
color this
리턴 float

IsEnoughContrast() 공개 정적인 메소드

public static IsEnoughContrast ( this color1, Color color2 ) : bool
color1 this
color2 Color
리턴 bool