C# Class GameEngine.Extensions.ColorExtensions

Mostrar archivo Open project: MichaelAquilina/Some-2D-RPG

Public Methods

Method Description
Add ( Color color1, Color color2, bool includeAlpha = true ) : Color
Divide ( Color color, float value, bool includeAlpha = true ) : Color
Inverse ( Color color ) : Color
Multiply ( Color color, float value, bool includeAlpha = true ) : Color
Subtract ( Color color1, Color color2, bool includeAlpha = true ) : Color
ToColor ( string hexString ) : Color
ToHex ( Color color, bool includeHash = true ) : string
Transition ( Color fromColor, Color toColor, float percentage, bool includeAlpha = true ) : Color

Method Details

Add() public static method

public static Add ( Color color1, Color color2, bool includeAlpha = true ) : Color
color1 Color
color2 Color
includeAlpha bool
return Color

Divide() public static method

public static Divide ( Color color, float value, bool includeAlpha = true ) : Color
color Color
value float
includeAlpha bool
return Color

Inverse() public static method

public static Inverse ( Color color ) : Color
color Color
return Color

Multiply() public static method

public static Multiply ( Color color, float value, bool includeAlpha = true ) : Color
color Color
value float
includeAlpha bool
return Color

Subtract() public static method

public static Subtract ( Color color1, Color color2, bool includeAlpha = true ) : Color
color1 Color
color2 Color
includeAlpha bool
return Color

ToColor() public static method

public static ToColor ( string hexString ) : Color
hexString string
return Color

ToHex() public static method

public static ToHex ( Color color, bool includeHash = true ) : string
color Color
includeHash bool
return string

Transition() public static method

public static Transition ( Color fromColor, Color toColor, float percentage, bool includeAlpha = true ) : Color
fromColor Color
toColor Color
percentage float
includeAlpha bool
return Color