new PhotoEditorSDK.Color(r, g, b, a)
sdk/lib/color.js, line 20
Creates a color
Name | Type | Default | Description |
---|---|---|---|
r |
Number | ||
g |
Number | ||
b |
Number | ||
a |
Number | 1 | optional |
Members
-
staticPhotoEditorSDK.Color.BLACKPhotoEditorSDK.Color
-
-
staticPhotoEditorSDK.Color.TRANSPARENTPhotoEditorSDK.Color
-
-
staticPhotoEditorSDK.Color.WHITEPhotoEditorSDK.Color
-
Methods
-
staticPhotoEditorSDK.Color.fromArray(arr){PhotoEditorSDK.Color}
sdk/lib/color.js, line 179 -
Creates a new Color object from the given array of numbers
Name Type Description arr
Array.<Number> Returns:
Type Description PhotoEditorSDK.Color -
staticPhotoEditorSDK.Color.fromHSV(h, s, v, a)
sdk/lib/color.js, line 129 -
Creates an RGBA color from the given HSV and alpha values
Name Type Default Description h
Number s
Number v
Number a
Number 1 optional -
clone(){PhotoEditorSDK.Color}
sdk/lib/color.js, line 187 -
Returns a clone of the current color
Returns:
Type Description PhotoEditorSDK.Color -
equals(color){Boolean}
sdk/lib/color.js, line 196 -
Checks if this color equals the given one
Name Type Description color
PhotoEditorSDK.Color Returns:
Type Description Boolean -
toArray(){Array.<Number>}
sdk/lib/color.js, line 74 -
Returns an array with 4 values (0...1)
Returns:
Type Description Array.<Number> -
toGLColor(){Array.<Number>}
sdk/lib/color.js, line 66 -
Returns an array with 4 values (0...1)
Returns:
Type Description Array.<Number> -
toHex(){String}
sdk/lib/color.js, line 53 -
Returns a hex representation of this color
Returns:
Type Description String -
toHSV(){Array.<Number>}
sdk/lib/color.js, line 90 -
Converts the RGB value to HSV
Returns:
Type Description Array.<Number> -
toRGBA(){String}
sdk/lib/color.js, line 39 -
Returns an rgba() representation of this color
Returns:
Type Description String -
toRGBGLColor(){Array.<Number>}
sdk/lib/color.js, line 82 -
Returns an array with 3 values (0...1)
Returns:
Type Description Array.<Number> -
toString(){String}
sdk/lib/color.js, line 218 -
Returns the string representation of this color
Returns:
Type Description String