Warp via the registry if enabled
[gnus] / lisp / shr-color.el
index c5ee8c7..7011034 100644 (file)
@@ -1,6 +1,6 @@
 ;;; shr-color.el --- Simple HTML Renderer color management
 
-;; Copyright (C) 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2012 Free Software Foundation, Inc.
 
 ;; Author: Julien Danjou <julien@danjou.info>
 ;; Keywords: html
@@ -26,7 +26,8 @@
 
 ;;; Code:
 
-(require 'color-lab)
+(require 'color)
+(eval-when-compile (require 'cl))
 
 (defgroup shr-color nil
   "Simple HTML Renderer colors"
@@ -40,7 +41,7 @@ Must be between 0 and 100."
 
 (defcustom shr-color-visible-distance-min 5
   "Minimum color distance between two colors to be considered visible.
-This value is used to compare result for `ciede2000'. Its an
+This value is used to compare result for `ciede2000'.  It's an
 absolute value without any unit."
   :group 'shr
   :type 'integer)
@@ -197,7 +198,8 @@ absolute value without any unit."
 Each entry should have the form (COLOR-NAME . HEXADECIMAL-COLOR).")
 
 (defun shr-color-relative-to-absolute (number)
-  "Convert a relative NUMBER to absolute. If NUMBER is absolute, return NUMBER.
+  "Convert a relative NUMBER to absolute.
+If NUMBER is absolute, return NUMBER.
 This will convert \"80 %\" to 204, \"100 %\" to 255 but \"123\" to \"123\"."
   (let ((string-length (- (length number) 1)))
     ;; Is this a number with %?
@@ -258,17 +260,18 @@ Like rgb() or hsl()