classes-Com-Tecnick-Color-Model-Template

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Template

Com\Tecnick\Color\Model\Template

Color Model Interface

Tags
since
2015-02-21
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2015-2015 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-color

Table of Contents

getArray()  : array<string|int, mixed>
Get an array with all color components
getComponentsString()  : string
Get a space separated string with color component values.
getCssColor()  : string
Get the CSS representation of the color
getJsPdfColor()  : string
Get the color format used in Acrobat JavaScript NOTE: the alpha channel is omitted from this representation unless is 0 = transparent
getNormalizedArray()  : array<string|int, mixed>
Get an array with color components values normalized between 0 and $max.
getPdfColor()  : string
Get the color components format used in PDF documents NOTE: the alpha channel is omitted
invertColor()  : mixed
Invert the color
toCmykArray()  : array<string|int, mixed>
Get an array with CMYK color components
toGrayArray()  : array<string|int, mixed>
Get an array with Gray color components
toHslArray()  : array<string|int, mixed>
Get an array with HSL color components
toRgbArray()  : array<string|int, mixed>
Get an array with RGB color components

Methods

getArray()

Get an array with all color components

public getArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

getComponentsString()

Get a space separated string with color component values.

public getComponentsString() : string
Return values
string

getCssColor()

Get the CSS representation of the color

public getCssColor() : string
Return values
string

getJsPdfColor()

Get the color format used in Acrobat JavaScript NOTE: the alpha channel is omitted from this representation unless is 0 = transparent

public getJsPdfColor() : string
Return values
string

getNormalizedArray()

Get an array with color components values normalized between 0 and $max.

public getNormalizedArray(int $max) : array<string|int, mixed>

NOTE: the alpha and other fraction component values are kept in the [0..1] range.

Parameters
$max : int

Maximum value to return (reference value)

Return values
array<string|int, mixed>

getPdfColor()

Get the color components format used in PDF documents NOTE: the alpha channel is omitted

public getPdfColor() : string
Return values
string

invertColor()

Invert the color

public invertColor() : mixed
Return values
mixed

toCmykArray()

Get an array with CMYK color components

public toCmykArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

with keys ('cyan', 'magenta', 'yellow', 'key', 'alpha')

toGrayArray()

Get an array with Gray color components

public toGrayArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

with keys ('gray')

toHslArray()

Get an array with HSL color components

public toHslArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

with keys ('hue', 'saturation', 'lightness', 'alpha')

toRgbArray()

Get an array with RGB color components

public toRgbArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

with keys ('red', 'green', 'blue', 'alpha')

 

© 2004-2021 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy