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];
$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."'";
}