TCPDF_COLORS

class

TCPDF_COLORS PHP color class for TCPDF

package

com.tecnick.tcpdf

version 1.0.004
author

Nicola Asuni - info@tecnick.com

Methods

Convert color to javascript color.

_JScolor(string $color)
static
protected
since 2.1.002

(2008-02-12)

public

static

Arguments

$color

string

color name or "#RRGGBB"

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.

convertHTMLColorToDec(string $hcolor,array &$spotc,array $defcol = array('R' => 128, 'G' => 128, 'B' => 128)): array|false
static
public

static

Arguments

$hcolor

string

HTML color.

$spotc

array

Reference to an array of spot colors.

$defcol

array

Color to return in case of error.

Response

array|false

RGB or CMYK color, or false in case of error.

Convert a color array into a string representation.

getColorStringFromArray(array $c): string
static
since 5.9.137

(2011-12-01)

public

static

Arguments

$c

array

Array of colors.

Response

string

The color array representation.

Return the Spot color array.

getSpotColor(string $name,array &$spotc): array|false
static
since 5.9.125

(2011-10-03)

public

static

Arguments

$name

string

Name of the spot color.

$spotc

array

Reference to an array of spot colors.

Response

array|false

Spot color array or false if not defined.

Properties

Array of WEB safe colors

webcolor :
static
public

static

Type(s)

Array of valid JavaScript color names

jscolor :
static
public

static

Type(s)

Array of Spot colors (C,M,Y,K,name) Color keys must be in lowercase and without spaces.

spotcolor :
static

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.

public

static

Type(s)