C# Class ZForge.Controls.XPTable.Editors.ColorCellEditor.ColorPicker.ColorPalette.AdobeColors

Summary description for AdobeColors.
Show file Open project: zhuangyy/Motion

Public Methods

Method Description
AdobeColors ( ) : System
CMYK_to_RGB ( CMYK _cmyk ) : Color

Converts CMYK to RGB

HSL_to_RGB ( HSL hsl ) : Color

Converts a colour from HSL to RGB

Adapted from the algoritm in Foley and Van-Dam

ModifyBrightness ( Color c, double brightness ) : Color

Modifies an existing brightness level

To reduce brightness use a number smaller than 1. To increase brightness use a number larger tnan 1

ModifyHue ( Color c, double Hue ) : Color

Modifies an existing Hue level

To reduce Hue use a number smaller than 1. To increase Hue use a number larger tnan 1

ModifySaturation ( Color c, double Saturation ) : Color

Modifies an existing Saturation level

To reduce Saturation use a number smaller than 1. To increase Saturation use a number larger tnan 1

RGB_to_CMYK ( Color c ) : CMYK

Converts RGB to CMYK

RGB_to_HSL ( Color c ) : HSL

Converts RGB to HSL

Takes advantage of whats already built in to .NET by using the Color.GetHue, Color.GetSaturation and Color.GetBrightness methods

SetBrightness ( Color c, double brightness ) : Color

Sets the absolute brightness of a colour

SetHue ( Color c, double Hue ) : Color

Sets the absolute Hue level

Accepted values 0-1

SetSaturation ( Color c, double Saturation ) : Color

Sets the absolute saturation level

Accepted values 0-1

Private Methods

Method Description
Round ( double val ) : int

Custom rounding function.

Method Details

AdobeColors() public method

public AdobeColors ( ) : System
return System

CMYK_to_RGB() public static method

Converts CMYK to RGB
public static CMYK_to_RGB ( CMYK _cmyk ) : Color
_cmyk CMYK A color to convert
return Color

HSL_to_RGB() public static method

Converts a colour from HSL to RGB
Adapted from the algoritm in Foley and Van-Dam
public static HSL_to_RGB ( HSL hsl ) : Color
hsl HSL The HSL value
return Color

ModifyBrightness() public static method

Modifies an existing brightness level
To reduce brightness use a number smaller than 1. To increase brightness use a number larger tnan 1
public static ModifyBrightness ( Color c, double brightness ) : Color
c Color The original colour
brightness double The luminance delta
return Color

ModifyHue() public static method

Modifies an existing Hue level
To reduce Hue use a number smaller than 1. To increase Hue use a number larger tnan 1
public static ModifyHue ( Color c, double Hue ) : Color
c Color The original colour
Hue double The Hue delta
return Color

ModifySaturation() public static method

Modifies an existing Saturation level
To reduce Saturation use a number smaller than 1. To increase Saturation use a number larger tnan 1
public static ModifySaturation ( Color c, double Saturation ) : Color
c Color The original colour
Saturation double The saturation delta
return Color

RGB_to_CMYK() public static method

Converts RGB to CMYK
public static RGB_to_CMYK ( Color c ) : CMYK
c Color A color to convert.
return CMYK

RGB_to_HSL() public static method

Converts RGB to HSL
Takes advantage of whats already built in to .NET by using the Color.GetHue, Color.GetSaturation and Color.GetBrightness methods
public static RGB_to_HSL ( Color c ) : HSL
c Color A Color to convert
return HSL

SetBrightness() public static method

Sets the absolute brightness of a colour
public static SetBrightness ( Color c, double brightness ) : Color
c Color Original colour
brightness double The luminance level to impose
return Color

SetHue() public static method

Sets the absolute Hue level
Accepted values 0-1
public static SetHue ( Color c, double Hue ) : Color
c Color An original colour
Hue double The Hue value to impose
return Color

SetSaturation() public static method

Sets the absolute saturation level
Accepted values 0-1
public static SetSaturation ( Color c, double Saturation ) : Color
c Color An original colour
Saturation double The saturation value to impose
return Color