summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-15 17:07:06 +0400
committerAndrew Dolgov <[email protected]>2013-04-15 17:07:06 +0400
commit12a6bd28ace16ff20f1f920831cffe1041b36d5c (patch)
tree2698e2003e82bad8dbeb63c1934129ca1455a131
parenta8c93f0a810732bd6abf71703056b277f525443f (diff)
remove hsl stuff from classes/feeds, we take care of this when choosing the color
-rw-r--r--classes/feeds.php10
-rw-r--r--include/rssfuncs.php2
2 files changed, 3 insertions, 9 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 81729aacc..6d15c99e8 100644
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -408,15 +408,7 @@ class Feeds extends Handler_Protected {
if ($fav_color) {
if (!isset($rgba_cache[$feed_id])) {
- $hsl = rgb2hsl(_color_unpack($fav_color));
-
- if ($hsl[1] < 0.1)
- $hsl[2] = 1;
- else if ($hsl[2] < 0.25)
- $hsl[2] = 0.25;
-
- $rgba_cache[$feed_id] = join(",", hsl2rgb($hsl));
-
+ $rgba_cache[$feed_id] = join(",", _color_unpack($fav_color));
}
$rgba = $rgba_cache[$feed_id];
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 0d55dce36..250534bd7 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -417,6 +417,8 @@
$favicon_color = db_escape_string($link,
calculate_avg_color($favicon_file));
+ if ($debug_enabled) _debug("color: $favicon_color");
+
$favicon_colorstring = ",favicon_avg_color = '".$favicon_color."'";
}