We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f3ee00 commit 8b45108Copy full SHA for 8b45108
webapp/src/Utils/Utils.php
@@ -375,7 +375,11 @@ public static function componentToHex(int $component): string
375
*/
376
public static function rgbToHex(array $color): string
377
{
378
- return "#" . static::componentToHex($color[0]) . static::componentToHex($color[1]) . static::componentToHex($color[2]);
+ $result = "#";
379
+ for (int $i=0; $i<count($color); $i++) {
380
+ $result += static::componentToHex($color[$i]);
381
+ }
382
+ return $result;
383
}
384
385
public static function relativeLuminance(string $rgb): float
0 commit comments