Name

get_color -- Return a RGB array from a symbolic color name.

Synopsis

array get_color ( string name )

Description

This method returns an array in proper RGB form (suitable for storing in an array parameter such as 'fillcolor' or 'strokecolor') from a symbolic name.

The symbolic name can be either a name (in the form 'black' or 'blue') or a set of hex triplets (such as #ffdd00).

Examples

// Set the default stroke color to blue
$pdf->set_default('strokecolor', $pdf->get_color('blue'));

See Also

Parameter array

History

This function was added in version 2.1. Hex triplet support was added in 2.3.

Bugs

The only symbolic names that work right now are black, white, red, blue, and green.