move rgb/hsl functions to their own namespace

This commit is contained in:
Andrew Dolgov 2021-02-16 17:07:23 +03:00
parent bdbbdbb0ed
commit 7fad6ce651
3 changed files with 4 additions and 3 deletions

View File

@ -322,9 +322,9 @@ class Feeds extends Handler_Protected {
if (!isset($rgba_cache[$feed_id])) {
if ($fav_color && $fav_color != 'fail') {
$rgba_cache[$feed_id] = _color_unpack($fav_color);
$rgba_cache[$feed_id] = \Colors\_color_unpack($fav_color);
} else {
$rgba_cache[$feed_id] = _color_unpack($this->_color_of($line['feed_title']));
$rgba_cache[$feed_id] = \Colors\_color_unpack($this->_color_of($line['feed_title']));
}
}

View File

@ -610,7 +610,7 @@ class RSSUtils {
id = ?");
$sth->execute([$feed]);
$favicon_color = calculate_avg_color($favicon_file);
$favicon_color = \Colors\calculate_avg_color($favicon_file);
$favicon_colorstring = ",favicon_avg_color = " . $pdo->quote($favicon_color);

View File

@ -1,4 +1,5 @@
<?php
namespace Colors;
if (file_exists("lib/floIcon.php")) {
require_once "lib/floIcon.php";