* shr-color: Error on terminal - "unspecified-bg"
@ 2010-11-25 4:25 Kan-Ru Chen
2010-11-25 7:33 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Kan-Ru Chen @ 2010-11-25 4:25 UTC (permalink / raw)
To: ding
Hi,
I usually use the emacs tty interface, the recent shr-color change seems
cannot handle.
(frame-parameter nil 'foreground-color)
=> "unspecified-fg"
(frame-parameter nil 'background-color)
=> "unspecified-bg"
(x-color-values "unspecified-bg")
=> nil
Debugger entered--Lisp error: (wrong-number-of-arguments #[(red green blue) "\303\304\305\b
#\"\207" [red green blue apply xyz->lab rgb->xyz] 6 ("/home/kanru/src/mirror/gnus/lisp/color-lab.elc" . 4929)] 0)
rgb->lab()
apply(rgb->lab nil)
(let* ((fg-lab (apply (quote rgb->lab) (rgb->normalize fg))) (bg-lab (apply (quote rgb->lab) (rgb->normalize bg))) (fg-bg-distance (color-lab-ciede2000 fg-lab bg-lab)) (luminance-distance (abs (- (car fg-lab) (car bg-lab))))) (if (and (>= fg-bg-distance shr-color-visible-distance-min) (>= luminance-distance shr-color-visible-luminance-min)) (list bg fg) (let ((Ls (set-minimum-interval (car bg-lab) (car fg-lab) 0 100 shr-color-visible-luminance-min fixed-background))) (unless fixed-background (setcar bg-lab (car Ls))) (setcar fg-lab (cadr Ls)) (list (if fixed-background bg (apply (quote format) "#%02x%02x%02x" (mapcar (lambda ... ...) (apply ... bg-lab)))) (apply (quote format) "#%02x%02x%02x" (mapcar (lambda (x) (* ... 255)) (apply (quote lab->rgb) fg-lab)))))))
shr-color-visible("unspecified-bg" "#800000" t)
shr-color-check("#800000" nil)
shr-insert-foreground-overlay("#800000" 735 800)
shr-descend((span (:style . "color: #800000;") (text . "■ 這把折疊萬能小刀的製造日期可遠溯至一千八百年前,是羅馬人「吃飯的傢伙」。工藝程度跟影集《百戰天龍》裡馬蓋先拿的那把相去不遠。")))
...
Cheers,
Kanru
--
A badly written book is only a blunder. A bad translation of a good
book is a crime.
-- Gilbert Highet
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: shr-color: Error on terminal - "unspecified-bg"
2010-11-25 4:25 shr-color: Error on terminal - "unspecified-bg" Kan-Ru Chen
@ 2010-11-25 7:33 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-25 7:33 UTC (permalink / raw)
To: ding
Kan-Ru Chen <kanru@kanru.info> writes:
> shr-color-visible("unspecified-bg" "#800000" t)
This should now be fixed.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-25 7:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-25 4:25 shr-color: Error on terminal - "unspecified-bg" Kan-Ru Chen
2010-11-25 7:33 ` Lars Magne Ingebrigtsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).