%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/net/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/net/shr-color.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303\304\305\306\307%\210\310\311\312\313\314DD\315\306\303\316\317&\210\310\320\312\313\321DD\322\306\303\316\323&\207" [require color custom-declare-group shr-color nil "Simple HTML Renderer colors" :group shr custom-declare-variable shr-color-visible-luminance-min funcall function #[0 "\300\207" [40] 1] "Minimum luminance distance between two colors to be considered visible.\nMust be between 0 and 100." :type number shr-color-visible-distance-min #[0 "\300\207" [5] 1] "Minimum color distance between two colors to be considered visible.\nThis value is used to compare result for `ciede2000'.  It's an\nabsolute value without any unit." integer] 8)
#@89 Alist of HTML colors.
Each entry should have the form (COLOR-NAME . HEXADECIMAL-COLOR).
(defconst shr-color-html-colors-alist '(("AliceBlue" . "#F0F8FF") ("AntiqueWhite" . "#FAEBD7") ("Aqua" . "#00FFFF") ("Aquamarine" . "#7FFFD4") ("Azure" . "#F0FFFF") ("Beige" . "#F5F5DC") ("Bisque" . "#FFE4C4") ("Black" . "#000000") ("BlanchedAlmond" . "#FFEBCD") ("Blue" . "#0000FF") ("BlueViolet" . "#8A2BE2") ("Brown" . "#A52A2A") ("BurlyWood" . "#DEB887") ("CadetBlue" . "#5F9EA0") ("Chartreuse" . "#7FFF00") ("Chocolate" . "#D2691E") ("Coral" . "#FF7F50") ("CornflowerBlue" . "#6495ED") ("Cornsilk" . "#FFF8DC") ("Crimson" . "#DC143C") ("Cyan" . "#00FFFF") ("DarkBlue" . "#00008B") ("DarkCyan" . "#008B8B") ("DarkGoldenRod" . "#B8860B") ("DarkGray" . "#A9A9A9") ("DarkGrey" . "#A9A9A9") ("DarkGreen" . "#006400") ("DarkKhaki" . "#BDB76B") ("DarkMagenta" . "#8B008B") ("DarkOliveGreen" . "#556B2F") ("Darkorange" . "#FF8C00") ("DarkOrchid" . "#9932CC") ("DarkRed" . "#8B0000") ("DarkSalmon" . "#E9967A") ("DarkSeaGreen" . "#8FBC8F") ("DarkSlateBlue" . "#483D8B") ("DarkSlateGray" . "#2F4F4F") ("DarkSlateGrey" . "#2F4F4F") ("DarkTurquoise" . "#00CED1") ("DarkViolet" . "#9400D3") ("DeepPink" . "#FF1493") ("DeepSkyBlue" . "#00BFFF") ("DimGray" . "#696969") ("DimGrey" . "#696969") ("DodgerBlue" . "#1E90FF") ("FireBrick" . "#B22222") ("FloralWhite" . "#FFFAF0") ("ForestGreen" . "#228B22") ("Fuchsia" . "#FF00FF") ("Gainsboro" . "#DCDCDC") ("GhostWhite" . "#F8F8FF") ("Gold" . "#FFD700") ("GoldenRod" . "#DAA520") ("Gray" . "#808080") ("Grey" . "#808080") ("Green" . "#008000") ("GreenYellow" . "#ADFF2F") ("HoneyDew" . "#F0FFF0") ("HotPink" . "#FF69B4") ("IndianRed" . "#CD5C5C") ("Indigo" . "#4B0082") ("Ivory" . "#FFFFF0") ("Khaki" . "#F0E68C") ("Lavender" . "#E6E6FA") ("LavenderBlush" . "#FFF0F5") ("LawnGreen" . "#7CFC00") ("LemonChiffon" . "#FFFACD") ("LightBlue" . "#ADD8E6") ("LightCoral" . "#F08080") ("LightCyan" . "#E0FFFF") ("LightGoldenRodYellow" . "#FAFAD2") ("LightGray" . "#D3D3D3") ("LightGrey" . "#D3D3D3") ("LightGreen" . "#90EE90") ("LightPink" . "#FFB6C1") ("LightSalmon" . "#FFA07A") ("LightSeaGreen" . "#20B2AA") ("LightSkyBlue" . "#87CEFA") ("LightSlateGray" . "#778899") ("LightSlateGrey" . "#778899") ("LightSteelBlue" . "#B0C4DE") ("LightYellow" . "#FFFFE0") ("Lime" . "#00FF00") ("LimeGreen" . "#32CD32") ("Linen" . "#FAF0E6") ("Magenta" . "#FF00FF") ("Maroon" . "#800000") ("MediumAquaMarine" . "#66CDAA") ("MediumBlue" . "#0000CD") ("MediumOrchid" . "#BA55D3") ("MediumPurple" . "#9370DB") ("MediumSeaGreen" . "#3CB371") ("MediumSlateBlue" . "#7B68EE") ("MediumSpringGreen" . "#00FA9A") ("MediumTurquoise" . "#48D1CC") ("MediumVioletRed" . "#C71585") ("MidnightBlue" . "#191970") ("MintCream" . "#F5FFFA") ("MistyRose" . "#FFE4E1") ("Moccasin" . "#FFE4B5") ("NavajoWhite" . "#FFDEAD") ("Navy" . "#000080") ("OldLace" . "#FDF5E6") ("Olive" . "#808000") ("OliveDrab" . "#6B8E23") ("Orange" . "#FFA500") ("OrangeRed" . "#FF4500") ("Orchid" . "#DA70D6") ("PaleGoldenRod" . "#EEE8AA") ("PaleGreen" . "#98FB98") ("PaleTurquoise" . "#AFEEEE") ("PaleVioletRed" . "#DB7093") ("PapayaWhip" . "#FFEFD5") ("PeachPuff" . "#FFDAB9") ("Peru" . "#CD853F") ("Pink" . "#FFC0CB") ("Plum" . "#DDA0DD") ("PowderBlue" . "#B0E0E6") ("Purple" . "#800080") ("RebeccaPurple" . "#663399") ("Red" . "#FF0000") ("RosyBrown" . "#BC8F8F") ("RoyalBlue" . "#4169E1") ("SaddleBrown" . "#8B4513") ("Salmon" . "#FA8072") ("SandyBrown" . "#F4A460") ("SeaGreen" . "#2E8B57") ("SeaShell" . "#FFF5EE") ("Sienna" . "#A0522D") ("Silver" . "#C0C0C0") ("SkyBlue" . "#87CEEB") ("SlateBlue" . "#6A5ACD") ("SlateGray" . "#708090") ("SlateGrey" . "#708090") ("Snow" . "#FFFAFA") ("SpringGreen" . "#00FF7F") ("SteelBlue" . "#4682B4") ("Tan" . "#D2B48C") ("Teal" . "#008080") ("Thistle" . "#D8BFD8") ("Tomato" . "#FF6347") ("Turquoise" . "#40E0D0") ("Violet" . "#EE82EE") ("Wheat" . "#F5DEB3") ("White" . "#FFFFFF") ("WhiteSmoke" . "#F5F5F5") ("Yellow" . "#FFFF00") ("YellowGreen" . "#9ACD32")) (#$ . 1095))
#@159 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".

(fn NUMBER)
(defalias 'shr-color-relative-to-absolute #[257 "\211GS\234\300=\203\301\302\303#!\304_\305\245\202\301!\207" [37 string-to-number substring 0 255 100] 7 (#$ . 5082)])
#@41 Convert X Y H to RGB value.

(fn X Y H)
(defalias 'shr-color-hue-to-rgb #[771 "\211\300W\203\n\211T\262\211\301V\203\211S\262\211\302\303!W\203&\304Z\305#\\\207\211\306W\203.\207\211\307\310\245W\203D\304Z\311\312\245Z\305#\\\207\207" [0 1 / 6.0 * 6 0.5 2.0 3.0 2.0 3.0] 8 (#$ . 5423)])
#@53 Convert H S L to fractional RGB values.

(fn H S L)
(defalias 'shr-color-hsl-to-rgb-fractions #[771 "\300\211\301X\203T_\262\202\\_Z\262\302_Z\262\303\304\305!\\#\303#\303	\304\306!Z#E\207" [nil 0.5 2 shr-color-hue-to-rgb / 3.0 3.0] 13 (#$ . 5734)])
#@90 Convert any color format to hexadecimal representation.
Like rgb() or hsl().

(fn COLOR)
(defalias 'shr-color->hexadecimal #[257 "\211\205\206\301\302\"\203\303\304\"\207\301\305\"\204\301\306\"\2036\307\310\311\312\304\"!\311\312\313\"!\311\312\314\"!$\207\301\315\"\204D\301\316\"\203|\317\312\304\"!\320\245\317\312\313\"!\321\245\317\312\314\"!\322\245\323#\211@A\211@A\211@A\324\313$\266\203\266\207\207\325\326#A\206\206\327\207" [shr-color-html-colors-alist string-match "\\(#[[:xdigit:]]\\{3\\}[[:xdigit:]]\\{3\\}?\\)" match-string 1 "rgb( *\\([0-9]\\{1,3\\}\\(?: *%\\)?\\) *, *\\([0-9]\\{1,3\\}\\(?: *%\\)?\\) *, *\\([0-9]\\{1,3\\}\\(?: *%\\)?\\) *)" "rgba( *\\([0-9]\\{1,3\\}\\(?: *%\\)?\\) *, *\\([0-9]\\{1,3\\}\\(?: *%\\)?\\) *, *\\([0-9]\\{1,3\\}\\(?: *%\\)?\\) *, *[0-9]*\\.?[0-9]+ *%? *)" format "#%02X%02X%02X" shr-color-relative-to-absolute match-string-no-properties 2 3 "hsl( *\\([0-9]\\{1,3\\}\\) *, *\\([0-9]\\{1,3\\}\\) *% *, *\\([0-9]\\{1,3\\}\\) *% *)" "hsla( *\\([0-9]\\{1,3\\}\\) *, *\\([0-9]\\{1,3\\}\\) *% *, *\\([0-9]\\{1,3\\}\\) *% *, *[0-9]*\\.?[0-9]+ *%? *)" string-to-number 360.0 100.0 100.0 shr-color-hsl-to-rgb-fractions color-rgb-to-hex assoc-string t nil] 19 (#$ . 6017)])
#@189 Set minimum interval between VAL1 and VAL2 to INTERVAL.
The values are bound by MIN and MAX.
If FIXED is t, then VAL1 will not be touched.

(fn VAL1 VAL2 MIN MAX INTERVAL &optional FIXED)
(defalias 'shr-color-set-minimum-interval #[1541 "\300Z!\211Y\204\203\200ZV\203%\\^\202+Z]\300\nZ!\211Y\203>\262	\202{\nV\203Q\nZ]\202Y\n\\^\300\fZ!\211Y\203l\262\202yY\203v\202w\262\266\266\202Z\301\245W\203\240Z]\262\\^\262\202\260Z]\262\\^\262\300Z!\262Y\204ZU\203\323\\\262\202U\203\344\\\262	\202U\203\365Z\262\202U\203Z\262	\210\210D\207" [abs 2.0] 14 (#$ . 7273)])
#@375 Check that BG and FG colors are visible if they are drawn on each other.
Return (bg fg) if they are.  If they are too similar, two new
colors are returned instead.
If FIXED-BACKGROUND is set, and if the color are not visible, a
new background color will not be computed.  Only the foreground
color will be adapted to be visible on BG.

(fn BG FG &optional FIXED-BACKGROUND)
(defalias 'shr-color-visible #[770 "\302!\302!\203\211\204D\202~\303\304\"\303\304\"\305\"\306@@Z!Y\203;\211	Y\203;D\202|\307@@\310\311	\f&\204Q@\240\210A@\240\210\203a	\202m\303\312\313\314\315\303\316\n\"\"#\303\312\313\314\317\303\316\f\"\"#D\262\266\204\207" [shr-color-visible-distance-min shr-color-visible-luminance-min color-name-to-rgb apply color-srgb-to-lab color-cie-de2000 abs shr-color-set-minimum-interval 0 100 format "#%02x%02x%02x" mapcar #[257 "\300^\301]\302_\207" [1 0 255] 3 "\n\n(fn X)"] color-lab-to-srgb #[257 "\300^\301]\302_\207" [1 0 255] 3 "\n\n(fn X)"]] 19 (#$ . 7990)])
(provide 'shr-color)

Zerion Mini Shell 1.0