classes-Com-Tecnick-Color-Css

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.

Css

Com\Tecnick\Color\Css

Css Color class

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

getColorObjFromCss()  : Model
Get the color object from a CSS color string
getColorObjFromJs()  : Model
Get the color object from acrobat Javascript syntax
getColorObjFromCssCmyk()  : Model
Get the color object from a CSS CMYK color string
getColorObjFromCssGray()  : Model
Get the color object from a CSS CMYK color string
getColorObjFromCssHsl()  : Model
Get the color object from a CSS CMYK color string
getColorObjFromCssRgb()  : Model
Get the color object from a CSS CMYK color string

Methods

getColorObjFromCss()

Get the color object from a CSS color string

protected getColorObjFromCss(string $type, string $color) : Model
Parameters
$type : string

color type: t, g, rgb, rgba, hsl, hsla, cmyk

$color : string

color specification (e.g.: rgb(255,128,64))

Tags
throws
Exception

if the color is not found

Return values
Model

or null for transparency (default)

getColorObjFromJs()

Get the color object from acrobat Javascript syntax

protected getColorObjFromJs(string $color) : Model
Parameters
$color : string

color specification (e.g.: ["RGB",0.1,0.3,1])

Tags
throws
Exception

if the color is not found

Return values
Model

or null for transparent color

getColorObjFromCssCmyk()

Get the color object from a CSS CMYK color string

private getColorObjFromCssCmyk(string $color) : Model
Parameters
$color : string

color specification (e.g.: rgb(255,128,64))

Tags
throws
Exception

if the color is not found

Return values
Model

getColorObjFromCssGray()

Get the color object from a CSS CMYK color string

private getColorObjFromCssGray(string $color) : Model
Parameters
$color : string

color specification (e.g.: rgb(255,128,64))

Tags
throws
Exception

if the color is not found

Return values
Model

getColorObjFromCssHsl()

Get the color object from a CSS CMYK color string

private getColorObjFromCssHsl(string $color) : Model
Parameters
$color : string

color specification (e.g.: rgb(255,128,64))

Tags
throws
Exception

if the color is not found

Return values
Model

getColorObjFromCssRgb()

Get the color object from a CSS CMYK color string

private getColorObjFromCssRgb(string $color) : Model
Parameters
$color : string

color specification (e.g.: rgb(255,128,64))

Tags
throws
Exception

if the color is not found

Return values
Model
 

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