Color

Namespace: PP;

Inheritance hierarchy

Object

Color

Description

The Color class is used to work with color parameters.

Syntax

PP.initClass(PP.Color, PP.Object, "Color");

Constructor

  Constructor name Brief description
Color The Color constructor creates an instance of the Color class.

Properties

  Property name Brief description
A The A property determines the color transparency from 0 to 255.
B The B property sets the blue color component from 0 to 255.
G The G property sets green color component from 0 to 255.
H The H property sets color hue in degrees from 0.0 to 360.0.
R The R property sets the red color component from 0 to 255.
S The S property sets the color saturation from 0 to 100.
V The V property sets the color brightness from 0 to 100.

Methods

  Method name Brief description
applyMatrix The applyMatrix method applies a color bubble chart.
brighten The brighten method changes color saturation.
darken The darken method darkens color for the specified transparency value.

getOpacity

The getOpacity method returns transparency of the color from 0 to 1.

initByColor

The initByColor method applies the color specified in parameters to the current one.
isEqual The isEqual method compares two colors.
toDecimalString The toDecimalString method returns the string that contains color value in RGB/RGBA format.
toString The toString method returns the string with the string with the color value in the hexadecimal format with the grid value in the beginning.
toStringDelAlpha The toStringDelAlpha method returns the string with the color value, taking into account transparency, in the hexadecimal format with the grid value in the beginning.

Static methods

Properties inherited from the Object class

  Property name Brief description

Id

The Id property determines a repository object identifier.

Methods inherited from the Object class

  Method name Brief description
clone The clone method creates an object copy.
dispose The dispose method deletes the component.
getHashCode The getHashCode method returns hash code of repository object.
getSettings The getSettings method returns repository object settings.
getTypeName The getTypeName method returns the name of the object type without the namespace, to which it belongs.
isEqual The isEqual method determines whether the specified object is equal to the current repository object.
isLive The isLive method determines validity of repository object.
removeAllEvents The removeAllEvents method removes all object event handlers by the specified context.
setSettings The setSettings method determines repository object settings.
defineProps The defineProps method creates get and set methods from name array for the specified class.
keys The keys method returns array of methods and properties names for the specified object.

PP