mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Andreas Köhler's patch to correctly build a html color value. Fixes
328933. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13428 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
9bf79f4cf8
commit
f3a90bdefb
@ -1,3 +1,8 @@
|
||||
2006-02-28 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/app-utils/options.scm: Andreas Köhler's patch to correctly
|
||||
build a html color value. Fixes 328933.
|
||||
|
||||
2006-02-28 Joshua Sled <jsled@asynchronous.org>
|
||||
|
||||
* src/bin/gnucash-bin.c (gnucash_command_line): Terminate
|
||||
|
@ -1159,13 +1159,17 @@
|
||||
(inexact->exact
|
||||
(min 255.0
|
||||
(truncate (* (/ 255.0 range) value)))))
|
||||
(define (number->hex-string number)
|
||||
(let ((ret (number->string number 16)))
|
||||
(cond ((< (string-length ret) 2) (string-append "0" ret))
|
||||
(else ret))))
|
||||
(let ((red (car color))
|
||||
(green (cadr color))
|
||||
(blue (caddr color)))
|
||||
(string-append
|
||||
(number->string (html-value red) 16)
|
||||
(number->string (html-value green) 16)
|
||||
(number->string (html-value blue) 16))))
|
||||
(number->hex-string (html-value red))
|
||||
(number->hex-string (html-value green))
|
||||
(number->hex-string (html-value blue)))))
|
||||
|
||||
(define (gnc:color->html color range)
|
||||
(string-append "#"
|
||||
|
Loading…
Reference in New Issue
Block a user