Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]

(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: string $name Name of the spot color.
param: array $spotc Reference to an array of spot colors.
return: array|false 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: string $hcolor HTML color.
param: array $spotc Reference to an array of spot colors.
param: array $defcol Color to return in case of error.
return: array|false RGB or CMYK color, or false in case of error.

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

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

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

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