Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.ui.util.ColorUtils Class Reference

List of all members.

Static Public Member Functions

static RGB addLightness (RGB rgb, float lightness)
static Color addLightness (Color color, float lightness)
static RGB scaleColorBy (RGB rgb, float scale)
static Color scaleColorBy (Color color, float scale)

Member Function Documentation

static RGB de.fu_berlin.inf.dpp.ui.util.ColorUtils.addLightness ( RGB  rgb,
float  lightness 
) [static]

Increases a color's lightness

Parameters:
rgbthat defines the color
lightnessby which the color's lightness should be increased;
range: -1 (results in black) to +1 (+1 results in white)
Returns:
See also:
HSL and HSV
static Color de.fu_berlin.inf.dpp.ui.util.ColorUtils.addLightness ( Color  color,
float  lightness 
) [static]

Increases a color's lightness

Parameters:
color
lightnessby which the color's lightness should be increased;
range: -1 (results in black) to +1 (+1 results in white)
Returns:
the new color

Note: Please keep in mind that a new color is created. Both the already existing and the scaled need to be disposed after usage!

See also:
HSL and HSV
static RGB de.fu_berlin.inf.dpp.ui.util.ColorUtils.scaleColorBy ( RGB  rgb,
float  scale 
) [static]

Scales a color's lightness; the higher the ratio the lighter the color

Parameters:
rgbthat defines the color
scalenon-negative whereas 0 results in zero lightness = black color
Returns:
the scaled RGB
See also:
HSL and HSV
static Color de.fu_berlin.inf.dpp.ui.util.ColorUtils.scaleColorBy ( Color  color,
float  scale 
) [static]

Scales a color's lightness; the higher the ratio the lighter the color

Parameters:
colorto be scaled
scalenon-negative whereas 0 results in zero lightness = black color
Returns:
the scaled color

Note: Please keep in mind that a new color is created. Both the already existing and the scaled need to be disposed after usage!

See also:
HSL and HSV
 All Classes Namespaces Files Functions Variables Enumerations