Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
|
PHP color class for TCPDF .. More...
Static Public Member Functions | |
static | _JScolor ($color) |
Convert color to javascript color. | |
static | convertHTMLColorToDec ($hcolor, &$spotc, $defcol=array('R'=>128, 'G'=>128, 'B'=>128)) |
Returns an array (RGB or CMYK) from an html color name, or a six-digit (i.e. | |
static | getColorStringFromArray ($c) |
Convert a color array into a string representation. | |
static | getSpotColor ($name, &$spotc) |
Return the Spot color array. | |
Static Public Attributes | |
static | $jscolor = array ('transparent', 'black', 'white', 'red', 'green', 'blue', 'cyan', 'magenta', 'yellow', 'dkGray', 'gray', 'ltGray') |
Array of valid JavaScript color names static. | |
static | $spotcolor |
Array of Spot colors (C,M,Y,K,name) Color keys must be in lowercase and without spaces. | |
static | $webcolor |
Array of WEB safe colors static. | |
PHP color class for TCPDF ..
|
static |
Convert color to javascript color.
string | $color | color name or "#RRGGBB" |
|
static |
Returns an array (RGB or CMYK) from an html color name, or a six-digit (i.e.
#3FE5AA), or three-digit (i.e. #7FF) hexadecimal color, or a javascript color array, or javascript color name.
string | $hcolor | HTML color. |
array | $spotc | Reference to an array of spot colors. |
array | $defcol | Color to return in case of error. |
array|false | RGB or CMYK color, or false in case of error. static |
|
static |
Convert a color array into a string representation.
array | $c | Array of colors. |
string | The color array representation. |
|
static |
Return the Spot color array.
string | $name | Name of the spot color. |
array | $spotc | Reference to an array of spot colors. |
array|false | Spot color array or false if not defined. |
|
static |
Array of Spot colors (C,M,Y,K,name) Color keys must be in lowercase and without spaces.
As long as no open standard for spot colours exists, you have to buy a colour book by one of the colour manufacturers and insert the values and names of spot colours directly. Common industry standard spot colors are: ANPA-COLOR, DIC, FOCOLTONE, GCMI, HKS, PANTONE, TOYO, TRUMATCH. static