Repair error in hsv->color
This commit is contained in:
parent
39e46c1cfa
commit
be7cf7417d
|
@ -21,7 +21,8 @@
|
||||||
[(< h* 4) (values 0 x chroma)]
|
[(< h* 4) (values 0 x chroma)]
|
||||||
[(< h* 5) (values x 0 chroma)]
|
[(< h* 5) (values x 0 chroma)]
|
||||||
[else (values chroma 0 x)]))
|
[else (values chroma 0 x)]))
|
||||||
(define (scale x) (inexact->exact (truncate (* 255 x))))
|
(define m (- v chroma))
|
||||||
|
(define (scale x) (inexact->exact (truncate (* 255 (+ x m)))))
|
||||||
(make-color (scale r) (scale g) (scale b)))
|
(make-color (scale r) (scale g) (scale b)))
|
||||||
|
|
||||||
(define (color-by-hash v)
|
(define (color-by-hash v)
|
||||||
|
|
Loading…
Reference in New Issue