PHP Class WPDKColors

Author: =undo= ([email protected])
Inheritance: extends WPDKObject
Datei anzeigen Open project: wpxtreme/wpdk

Public Properties

Property Type Description
$__version string Override version

Public Methods

Method Description
hexAddition ( string $hex, string $num ) : string Perform adding (or subtracting) operation on a hexadecimal colour code
rgb2hex ( string $value ) : boolean | string!array Convert a hex decimal color code to its RGB equivalent and vice versa.

Method Details

hexAddition() public static method

echo WPDKColors::hexAddition( 'C00001', '1' ); // #C10102
Since: 1.2.0
public static hexAddition ( string $hex, string $num ) : string
$hex string Color hexdecimal value like 'C00001'
$num string Value hexdecimal to add like 1
return string

rgb2hex() public static method

echo WPDKColors::rgb2hex( 'FFCC00' ); // array( 255, 240, 0 ) echo WPDKColors::rgb2hex( '1,200,16' ); // '#01C810'
Since: 1.2.0
public static rgb2hex ( string $value ) : boolean | string!array
$value string
return boolean | string!array

Property Details

$__version public_oe property

Override version
public string $__version
return string