Table of contents
Namespace: Com\Tecnick\Color
File: PdfColorWriterInterface.php line 36
Writes the PDF and Acrobat JavaScript color forms.
Implemented by Pdf.
Tags
- since: 2026-08-26
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2015-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-color
Methods
getColorObject()
File: PdfColorWriterInterface.php line 95
public getColorObject(string $color[, bool $allowSpot = true ]) : Model|null
Parameters
- $color : string: HTML, CSS or Spot color to parse
- $allowSpot : bool = true: True to resolve spot colors, false to force a device color.
Return values
Model|null
getJsColorString()
File: PdfColorWriterInterface.php line 87
public getJsColorString(string $color) : string
Parameters
- $color : string: color name or color object
Return values
string
getPdfCmykComponents()
File: PdfColorWriterInterface.php line 80
public getPdfCmykComponents(string $color[, bool $allowSpot = true ]) : string
Parameters
- $color : string: HTML, CSS or Spot color to parse
- $allowSpot : bool = true: True to resolve spot colors, false to force a device color.
Return values
string
getPdfColor()
File: PdfColorWriterInterface.php line 46
public getPdfColor(string $color[, bool $stroke = false ][, float $tint = 1 ][, bool $allowSpot = true ]) : string
Parameters
- $color : string: HTML, CSS or Spot color to parse
- $stroke : bool = false: True for stroking, false for non-stroking.
- $tint : float = 1: Intensity of the color (from 0 to 1). Spot colors only.
- $allowSpot : bool = true: True to resolve (and register) spot colors, false to force a device color.
Return values
string
getPdfFillColor()
File: PdfColorWriterInterface.php line 64
public getPdfFillColor(string $color[, float $tint = 1 ][, bool $allowSpot = true ]) : string
Parameters
- $color : string: HTML, CSS or Spot color to parse
- $tint : float = 1: Intensity of the color (from 0 to 1). Spot colors only.
- $allowSpot : bool = true: True to resolve (and register) spot colors, false to force a device color.
Return values
string
getPdfRgbComponents()
File: PdfColorWriterInterface.php line 72
public getPdfRgbComponents(string $color[, bool $allowSpot = true ]) : string
Parameters
- $color : string: HTML, CSS or Spot color to parse
- $allowSpot : bool = true: True to resolve spot colors, false to force a device color.
Return values
string
getPdfStrokeColor()
File: PdfColorWriterInterface.php line 55
public getPdfStrokeColor(string $color[, float $tint = 1 ][, bool $allowSpot = true ]) : string
Parameters
- $color : string: HTML, CSS or Spot color to parse
- $tint : float = 1: Intensity of the color (from 0 to 1). Spot colors only.
- $allowSpot : bool = true: True to resolve (and register) spot colors, false to force a device color.
Return values
string