Method |
Description |
|
adjust_brightness ( string $hex, integer $steps ) : string |
Adjusts brightness of the $hex color. |
|
brightness_difference ( string $color_1 = '#ffffff', string $color_2 = '#000000' ) : string |
This function tries to compare the brightness of the colors. |
|
color_difference ( string $color_1 = '#ffffff', string $color_2 = '#000000' ) : string |
This is a very simple algorithm that works by summing up the differences between the three color components red, green and blue. |
|
get_alpha_from_rgba ( string $color ) : integer | float |
Get the alpha channel from an rgba color. |
|
get_brightness ( string $hex ) : integer |
Gets the brightness of the $hex color. |
|
get_rgb ( string $color, boolean $implode = false ) : array | string |
Gets the rgb value of a color. |
|
get_rgba ( string $color = '#fff', integer | float $alpha = 1 ) : string |
Gets the rgba value of the $color. |
|
hex_to_hsv ( string $hex ) : array |
Convert hex color to hsv. |
|
lumosity_difference ( string $color_1 = '#ffffff', string $color_2 = '#000000' ) : string |
Uses the luminosity to calculate the difference between the given colors. |
|
mix_colors ( string | false $hex1, string | false $hex2, integer $percentage ) : string |
Mixes 2 hex colors. |
|
rgb_to_hsv ( string $color = [] ) : array |
Convert hex color to hsv. |
|
rgba2hex ( string | array $color ) : string |
A proxy for the sanitize_color method. |
|
rgba_to_rgb ( string $color ) : string |
Strips the alpha value from an RGBA color string. |
|
sanitize_color ( string | array $color = '', string $mode = 'auto' ) : string |
Sanitize colors. |
|
sanitize_hex ( string | array $color = '#FFFFFF', boolean $hash = true ) : string |
A proxy for the sanitize_color method. |
|
sanitize_rgba ( string $color ) : string |
A proxy the sanitize_color method. |
|