(no description)
File Size: | 88 lines (3 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Color:: (4 methods):
rgb()
toARGB()
throwIfInvalidColorComponentValue()
convertColorComponentToHex()
rgb(int $red, int $green, int $blue) X-Ref |
Returns an RGB color from R, G and B values. param: int $red Red component, 0 - 255 param: int $green Green component, 0 - 255 param: int $blue Blue component, 0 - 255 return: string RGB color |
toARGB(string $rgbColor) X-Ref |
Returns the ARGB color of the given RGB color, assuming that alpha value is always 1. param: string $rgbColor RGB color like "FF08B2" return: string ARGB color |
throwIfInvalidColorComponentValue(int $colorComponent) X-Ref |
Throws an exception is the color component value is outside of bounds (0 - 255). |
convertColorComponentToHex(int $colorComponent) X-Ref |
Converts the color component to its corresponding hexadecimal value. param: int $colorComponent Color component, 0 - 255 return: string Corresponding hexadecimal value, with a leading 0 if needed. E.g "0f", "2d" |