SemaforLight
extends SvgTag
in package
Show light or dark circle in given color
Tags
Table of Contents
- $properties : mixed
- __construct() : mixed
- adjustBrightness() : string
- Change color hue
- colorNameToHex() : string
- converts an html color name to a hex color value if the input is not a color name, the original value is returned
- getColorCode() : type
- Obtain lighter or darker color code
Properties
$properties
public
mixed
$properties
= ['xmlns' => "http://www.w3.org/2000/svg"]
Methods
__construct()
public
__construct([mixed $color = 'white' ][, mixed $properties = [] ]) : mixed
Parameters
- $color : mixed = 'white'
- $properties : mixed = []
Return values
mixed —adjustBrightness()
Change color hue
public
static adjustBrightness(string $hex, int $steps) : string
Parameters
- $hex : string
-
initial color
- $steps : int
Return values
string —changed color
colorNameToHex()
converts an html color name to a hex color value if the input is not a color name, the original value is returned
public
static colorNameToHex(string $color_name) : string
Parameters
- $color_name : string
Return values
string —rgb code
getColorCode()
Obtain lighter or darker color code
public
getColorCode(string $color) : type
Parameters
- $color : string
-
name e.g. blue