Documentation

Color
in package

Pop CSS color class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
1.1.0

Table of Contents

hex()  : Hex
Instantiate an RGB color object
hsl()  : Hsl
Instantiate an RGB color object
parse()  : ColorInterface|object
Parse CSS color from string
parseColorValues()  : array<string|int, mixed>
Parse CSS color values from string
rgb()  : Rgb
Instantiate an RGB color object

Methods

hex()

Instantiate an RGB color object

public static hex(string $hex) : Hex
Parameters
$hex : string
Return values
Hex

hsl()

Instantiate an RGB color object

public static hsl(int $h, int $s, int $l[, float $a = null ]) : Hsl
Parameters
$h : int
$s : int
$l : int
$a : float = null
Return values
Hsl

parseColorValues()

Parse CSS color values from string

public static parseColorValues(string $colorString) : array<string|int, mixed>
Parameters
$colorString : string
Tags
throws
Exception
Return values
array<string|int, mixed>

rgb()

Instantiate an RGB color object

public static rgb(int $r, int $g, int $b[, float $a = null ]) : Rgb
Parameters
$r : int
$g : int
$b : int
$a : float = null
Return values
Rgb

Search results