MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.117.158.174
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/gnus/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/gnus/shr-color.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:27 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/gnus/shr-color.el
;;; in Emacs version 24.3.1
;;; 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\306\307\314\315&\210\310\316\317\320\306\307\314\321&\207" [require color custom-declare-group shr-color nil "Simple HTML Renderer colors" :group shr custom-declare-variable shr-color-visible-luminance-min 40 "Minimum luminance distance between two colors to be considered visible.\nMust be between 0 and 100." :type float shr-color-visible-distance-min 5 "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" . "#9370D8") ("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" . "#D87093") ("PapayaWhip" . "#FFEFD5") ("PeachPuff" . "#FFDAB9") ("Peru" . "#CD853F") ("Pink" . "#FFC0CB") ("Plum" . "#DDA0DD") ("PowderBlue" . "#B0E0E6") ("Purple" . "#800080") ("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")) (#$ . 1166))
#@146 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".
(defalias 'shr-color-relative-to-absolute #[(number) "GS	\234\302=\203\303\304	O!\305_\306\245\202\303!)\207" [number string-length 37 string-to-number 0 255 100] 4 (#$ . 5123)])
#@29 Convert X Y H to RGB value.
(defalias 'shr-color-hue-to-rgb #[(x y h) "\303W\203	T\304V\203S\305W\203\"	\306\n	Z\307#\\\207\310W\203*\n\207\311W\203<	\306\n	Z\312Z\307#\\\207	\207" [h x y 0 1 0.16666666666666666 * 6 0.5 0.6666666666666666 0.6666666666666666] 5 (#$ . 5462)])
#@41 Convert H S L to fractional RGB values.
(defalias 'shr-color-hsl-to-rgb-fractions #[(h s l) "\305\211\n\306X\203\nT_\202\n\\\n_Z\n\307_Z\310	\f\311\\#\310	\f#\310	\f\312Z#E*\207" [m2 m1 l s h nil 0.5 2 shr-color-hue-to-rgb 0.3333333333333333 0.3333333333333333] 7 (#$ . 5760)])
#@78 Convert any color format to hexadecimal representation.
Like rgb() or hsl().
(defalias 'shr-color->hexadecimal #[(color) "\205\232\306\307\"\203\310\311\"\207\306\312\"\204\306\313\"\2034\314\315\316\317\311\"!\316\317\320\"!\316\317\321\"!$\207\306\322\"\204B\306\323\"\203\217\324\317\311\"!\325\245\324\317\320\"!\326\245\324\317\321\"!\327\245\330\n	#\211G\321U\203r\f\211A@\202y\331\332\333\fGD\"\f\211A@\f@ \334
 #.\207\335!\336#A\206\232\333\207" [color l s h #1=#:--cl-rest-- r string-match "\\(#[0-9a-fA-F]\\{3\\}[0-9a-fA-F]\\{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 signal wrong-number-of-arguments nil color-rgb-to-hex assoc-string t g b shr-color-html-colors-alist] 9 (#$ . 6060)])
#@140 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.
(defalias 'shr-color-set-minimum-interval #[(val1 val2 min max interval &optional fixed) "\306	Z!\211Y\204\361\f\203\nZ	V\203#	
\\^\202)		
Z]\n\306\nZ!\211Y\203?\n\202{	V\203N	Z]\202T\\^\f\306\fZ!\211
Y\203j\f\202z
Y\203w\n\202y\f*+\202\361\nZ\307\245	W\203\234	
Z]	
\\^\202\252		
Z]
\\^\306	Z!\211Y\204\360\nZ	U\203\310	
\\\202\357		U\203\326
\\\202\357U\203\344	
Z\202\357	U\203\357
Z))	)D\207" [val1 val2 diff interval fixed missing abs 2.0 max min val2-good-direction diff-val2-good-direction-val1 val2-bad-direction diff-val2-bad-direction-val1] 4 (#$ . 7398)])
#@336 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.
(defalias 'shr-color-visible #[(bg fg &optional fixed-background) "\306!\306	!\211\203\n\204	D\202\214\307\310\"\307\310\n\"\311\f
\"\312\f@
@Z!Y\203EY\203E	D\202\213\313
@\f@\314\315&\204_
@\240\210\f\211A@)\240\210\203s	\202~\307\316\317\320\321\307\322
\"\"#\307\316\317\320\323\307\322\f\"\"#)D,*\207" [fg bg bg-norm fg-norm fg-lab bg-lab 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 #[(x) "\301^\302]\303_\207" [x 1 0 255] 2] color-lab-to-srgb #[(x) "\301^\302]\303_\207" [x 1 0 255] 2] fg-bg-distance luminance-distance shr-color-visible-distance-min shr-color-visible-luminance-min fixed-background Ls x] 10 (#$ . 8208)])
(provide 'shr-color)

MMCT - 2023