PHP Class Habari\ColorUtils

Mostrar archivo Open project: habari/system Class Usage Examples

Public Methods

Method Description
hex_rgb ( $hex_string ) Converts a HTML style hex string ('#7f6699') to an RGB array.
hsv_hsvarr ( $h, $s, $v ) Convert HSV args to HSV array.
hsv_rgb ( $hsv_arr ) Convert a HSV array to RGB.
rgb_hex ( $rgb_arr ) Convert an RGB array to a HTML style hex color.
rgb_hsv ( $rgb_arr ) Convert an RGB array to a HSV array.
rgb_rgbarr ( $r, $g, $b ) Convert RGB args to RGB array.

Method Details

hex_rgb() public static method

Converts a HTML style hex string ('#7f6699') to an RGB array.
public static hex_rgb ( $hex_string )

hsv_hsvarr() public static method

Convert HSV args to HSV array.
public static hsv_hsvarr ( $h, $s, $v )

hsv_rgb() public static method

Convert a HSV array to RGB.
public static hsv_rgb ( $hsv_arr )

rgb_hex() public static method

Convert an RGB array to a HTML style hex color.
public static rgb_hex ( $rgb_arr )

rgb_hsv() public static method

Convert an RGB array to a HSV array.
public static rgb_hsv ( $rgb_arr )

rgb_rgbarr() public static method

Convert RGB args to RGB array.
public static rgb_rgbarr ( $r, $g, $b )