|
@@ 45-50 (lines=6) @@
|
| 42 |
|
* @param array &$rgb_array The RGB array to modify |
| 43 |
|
* @return void |
| 44 |
|
*/ |
| 45 |
|
public static function rgb_array(array &$rgb_array) { |
| 46 |
|
static::standardize_array($rgb_array, ['r', 'g', 'b']); |
| 47 |
|
static::rgb($rgb_array['r']); |
| 48 |
|
static::rgb($rgb_array['g']); |
| 49 |
|
static::rgb($rgb_array['b']); |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
/** |
| 53 |
|
* Forces a float to be within the range of 0 and 100 or if the offset is |
|
@@ 74-79 (lines=6) @@
|
| 71 |
|
* @param array &$hsl_array The HSL array to modify |
| 72 |
|
* @return void |
| 73 |
|
*/ |
| 74 |
|
public static function hsl_array(array &$hsl_array) { |
| 75 |
|
static::standardize_array($hsl_array, ['h', 's', 'l']); |
| 76 |
|
static::hsl($hsl_array['h'], 'h'); |
| 77 |
|
static::hsl($hsl_array['s'], 's'); |
| 78 |
|
static::hsl($hsl_array['l'], 'l'); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
/** |
| 82 |
|
* Forces and HSL array to have specific offsets, and max values. |
|
@@ 87-92 (lines=6) @@
|
| 84 |
|
* @param array &$hsl_array The HSL array to modify |
| 85 |
|
* @return void |
| 86 |
|
*/ |
| 87 |
|
public static function hsb_array(array &$hsl_array) { |
| 88 |
|
static::standardize_array($hsl_array, ['h', 's', 'b']); |
| 89 |
|
static::hsl($hsl_array['h'], 'h'); |
| 90 |
|
static::hsl($hsl_array['s'], 's'); |
| 91 |
|
static::hsl($hsl_array['b'], 'b'); |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
/** |
| 95 |
|
* Forces a float to be within the range of 0 and 100. |