@@ -17,9 +17,9 @@ trait ConversionTrait
17
17
/**
18
18
* Convert CMY color values to CMYK.
19
19
*
20
- * @param int| float $c The cyan value. (0, 100)
21
- * @param int| float $m The magenta value. (0, 100)
22
- * @param int| float $y The yellow value. (0, 100)
20
+ * @param float|int $c The cyan value. (0, 100)
21
+ * @param float|int $m The magenta value. (0, 100)
22
+ * @param float|int $y The yellow value. (0, 100)
23
23
* @return array An array containing the CMYK values.
24
24
*/
25
25
protected static function CMY2CMYK (float |int $ c , float |int $ m , float |int $ y ): array
@@ -43,9 +43,9 @@ protected static function CMY2CMYK(float|int $c, float|int $m, float|int $y): ar
43
43
/**
44
44
* Convert CMY color values to RGB.
45
45
*
46
- * @param int| float $c The cyan value. (0, 100)
47
- * @param int| float $m The magenta value. (0, 100)
48
- * @param int| float $y The yellow value. (0, 100)
46
+ * @param float|int $c The cyan value. (0, 100)
47
+ * @param float|int $m The magenta value. (0, 100)
48
+ * @param float|int $y The yellow value. (0, 100)
49
49
* @return array An array containing the RGB values.
50
50
*/
51
51
protected static function CMY2RGB (float |int $ c , float |int $ m , float |int $ y ): array
@@ -60,10 +60,10 @@ protected static function CMY2RGB(float|int $c, float|int $m, float|int $y): arr
60
60
/**
61
61
* Convert CMYK color values to CMY.
62
62
*
63
- * @param int| float $c The cyan value. (0, 100)
64
- * @param int| float $m The magenta value. (0, 100)
65
- * @param int| float $y The yellow value. (0, 100)
66
- * @param int| float $k The key value. (0, 100)
63
+ * @param float|int $c The cyan value. (0, 100)
64
+ * @param float|int $m The magenta value. (0, 100)
65
+ * @param float|int $y The yellow value. (0, 100)
66
+ * @param float|int $k The key value. (0, 100)
67
67
* @return array An array containing the CMY values.
68
68
*/
69
69
protected static function CMYK2CMY (float |int $ c , float |int $ m , float |int $ y , float |int $ k ): array
@@ -80,9 +80,9 @@ protected static function CMYK2CMY(float|int $c, float|int $m, float|int $y, flo
80
80
/**
81
81
* Convert HSL color values to RGB.
82
82
*
83
- * @param int| float $h The hue value. (0, 360)
84
- * @param int| float $s The saturation value. (0, 100)
85
- * @param int| float $l The lightness value. (0, 100)
83
+ * @param float|int $h The hue value. (0, 360)
84
+ * @param float|int $s The saturation value. (0, 100)
85
+ * @param float|int $l The lightness value. (0, 100)
86
86
* @return array An array containing the RGB values.
87
87
*/
88
88
protected static function HSL2RGB (float |int $ h , float |int $ s , float |int $ l ): array
@@ -117,9 +117,9 @@ protected static function HSL2RGB(float|int $h, float|int $s, float|int $l): arr
117
117
/**
118
118
* Convert HSV color values to RGB.
119
119
*
120
- * @param int| float $h The hue value. (0, 360)
121
- * @param int| float $s The saturation value. (0, 100)
122
- * @param int| float $v The brightness value (0, 100)
120
+ * @param float|int $h The hue value. (0, 360)
121
+ * @param float|int $s The saturation value. (0, 100)
122
+ * @param float|int $v The brightness value (0, 100)
123
123
* @return array An array containing the RGB values.
124
124
*/
125
125
protected static function HSV2RGB (float |int $ h , float |int $ s , float |int $ v ): array
@@ -185,9 +185,9 @@ protected static function HSV2RGB(float|int $h, float|int $s, float|int $v): arr
185
185
/**
186
186
* Convert RGB color values to CMY.
187
187
*
188
- * @param int| float $r The red value. (0, 255)
189
- * @param int| float $g The green value. (0, 255)
190
- * @param int| float $b The blue value. (0, 255)
188
+ * @param float|int $r The red value. (0, 255)
189
+ * @param float|int $g The green value. (0, 255)
190
+ * @param float|int $b The blue value. (0, 255)
191
191
* @return array An array containing the CMY values.
192
192
*/
193
193
protected static function RGB2CMY (float |int $ r , float |int $ g , float |int $ b ): array
@@ -202,9 +202,9 @@ protected static function RGB2CMY(float|int $r, float|int $g, float|int $b): arr
202
202
/**
203
203
* Convert RGB color values to HSL.
204
204
*
205
- * @param int| float $r The red value. (0, 255)
206
- * @param int| float $g The green value. (0, 255)
207
- * @param int| float $b The blue value. (0, 255)
205
+ * @param float|int $r The red value. (0, 255)
206
+ * @param float|int $g The green value. (0, 255)
207
+ * @param float|int $b The blue value. (0, 255)
208
208
* @return array An array containing the HSL values.
209
209
*/
210
210
protected static function RGB2HSL (float |int $ r , float |int $ g , float |int $ b ): array
@@ -256,9 +256,9 @@ protected static function RGB2HSL(float|int $r, float|int $g, float|int $b): arr
256
256
/**
257
257
* Convert RGB color values to HSV.
258
258
*
259
- * @param int| float $r The red value. (0, 255)
260
- * @param int| float $g The green value. (0, 255)
261
- * @param int| float $b The blue value. (0, 255)
259
+ * @param float|int $r The red value. (0, 255)
260
+ * @param float|int $g The green value. (0, 255)
261
+ * @param float|int $b The blue value. (0, 255)
262
262
* @return array An array containing the HSV values.
263
263
*/
264
264
protected static function RGB2HSV (float |int $ r , float |int $ g , float |int $ b ): array
@@ -305,9 +305,9 @@ protected static function RGB2HSV(float|int $r, float|int $g, float|int $b): arr
305
305
/**
306
306
* Calculate the relative luminance of an RGB color.
307
307
*
308
- * @param int| float $r The red value. (0, 255)
309
- * @param int| float $g The green value. (0, 255)
310
- * @param int| float $b The blue value. (0, 255)
308
+ * @param float|int $r The red value. (0, 255)
309
+ * @param float|int $g The green value. (0, 255)
310
+ * @param float|int $b The blue value. (0, 255)
311
311
* @return float The relative luminance value.
312
312
*/
313
313
protected static function RGB2Luma (float |int $ r , float |int $ g , float |int $ b ): float
@@ -322,10 +322,10 @@ protected static function RGB2Luma(float|int $r, float|int $g, float|int $b): fl
322
322
/**
323
323
* Calculate the R, G or B value of a hue.
324
324
*
325
- * @param int| float $v1 The first value.
326
- * @param int| float $v2 The second value.
327
- * @param int| float $vH The hue value.
328
- * @return int| float The R, G or B value.
325
+ * @param float|int $v1 The first value.
326
+ * @param float|int $v2 The second value.
327
+ * @param float|int $vH The hue value.
328
+ * @return float|int The R, G or B value.
329
329
*/
330
330
protected static function RGBHue (float |int $ v1 , float |int $ v2 , float |int $ vH ): float |int
331
331
{
@@ -349,8 +349,8 @@ protected static function RGBHue(float|int $v1, float|int $v2, float|int $vH): f
349
349
/**
350
350
* Calculate the relative R, G or B value for luma calculation.
351
351
*
352
- * @param int| float $v The value.
353
- * @return int| float The R, G or B value.
352
+ * @param float|int $v The value.
353
+ * @return float|int The R, G or B value.
354
354
*/
355
355
protected static function RGBLumaValue (float |int $ v ): float |int
356
356
{
0 commit comments