WooCommerce Code Reference

Color extends CSSFunction
in package

`Color's can be input in the form #rrggbb, #rgb or schema(val1, val2, …) but are always stored as an array of ('s' => val1, 'c' => val2, 'h' => val3, …) and output in the second form.

Table of Contents

__construct()  : mixed
phpcs:ignore Generic.Files.LineLength
__toString()  : string
addListComponent()  : void
getArguments()  : array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>
getColor()  : array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>
getColorDescription()  : string
getListComponents()  : array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>
getListSeparator()  : string
getName()  : string
render()  : string
setColor()  : void
setListComponents()  : void
setListSeparator()  : void
setName()  : void
mapRange()  : float
parseMicrosoftFilter()  : CSSFunction
parseUnicodeRangeValue()  : string

Methods

__construct()

phpcs:ignore Generic.Files.LineLength

public __construct(array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string> $aColor, int $iLineNo) : mixed
Parameters
$aColor : array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>
$iLineNo : int
Return values
mixed

getArguments()

public getArguments() : array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>
Return values
array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>

getColor()

public getColor() : array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>
Return values
array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>

getListComponents()

public getListComponents() : array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>
Return values
array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>

setColor()

public setColor(array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string> $aColor) : void
Parameters
$aColor : array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>
Return values
void

setListComponents()

public setListComponents(array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string> $aComponents) : void
Parameters
$aComponents : array<int, \Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\RuleValueList|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSFunction|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\CSSString|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\LineName|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\Size|\Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value\URL|string>
Return values
void

mapRange()

private static mapRange(float $fVal, float $fFromMin, float $fFromMax, float $fToMin, float $fToMax) : float
Parameters
$fVal : float
$fFromMin : float
$fFromMax : float
$fToMin : float
$fToMax : float
Return values
float