final class colorObj (View source)

Instances of colorObj are always embedded inside other classes.

Properties

int $red
int $green
int $blue
int $alpha

Methods

string
toHex()

Get the color as a hex string "#rrggbb" or (if alpha is not 255) "#rrggbbaa".

int
setHex(string $hex)

Set red, green, blue and alpha values. The hex string should have the form "#rrggbb" (alpha will be set to 255) or "#rrggbbaa". Returns MS_SUCCESS.

Details

final string toHex()

Get the color as a hex string "#rrggbb" or (if alpha is not 255) "#rrggbbaa".

Return Value

string

final int setHex(string $hex)

Set red, green, blue and alpha values. The hex string should have the form "#rrggbb" (alpha will be set to 255) or "#rrggbbaa". Returns MS_SUCCESS.

Parameters

string $hex

Return Value

int