Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

(no description)

Author: Nicola Asuni
File Size: 462 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

TCPDF_COLORS:: (4 methods):
  getSpotColor()
  convertHTMLColorToDec()
  getColorStringFromArray()
  _JScolor()


Class: TCPDF_COLORS  - X-Ref


getSpotColor($name, &$spotc)   X-Ref
Return the Spot color array.

param: $name (string) Name of the spot color.
param: $spotc (array) Reference to an array of spot colors.
return: (array) Spot color array or false if not defined.

convertHTMLColorToDec($hcolor, &$spotc, $defcol=array('R'=>128,'G'=>128,'B'=>128)   X-Ref
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.

param: $hcolor (string) HTML color.
param: $spotc (array) Reference to an array of spot colors.
param: $defcol (array) Color to return in case of error.
return: array RGB or CMYK color, or false in case of error.

getColorStringFromArray($c)   X-Ref
Convert a color array into a string representation.

param: $c (array) Array of colors.
return: (string) The color array representation.

_JScolor($color)   X-Ref
Convert color to javascript color.

param: $color (string) color name or "#RRGGBB"