Remove old HSV->RGB
This commit is contained in:
parent
428500be37
commit
74c666ccb2
1 changed files with 1 additions and 20 deletions
|
|
@ -54,25 +54,6 @@ let hsbToRgb (h:float) (s:float) (v:float) =
|
||||||
Color.FromArgb(255, clamp (int (R*255.0)),
|
Color.FromArgb(255, clamp (int (R*255.0)),
|
||||||
clamp (int (G*255.0)),
|
clamp (int (G*255.0)),
|
||||||
clamp (int (B*255.0)))
|
clamp (int (B*255.0)))
|
||||||
(*
|
|
||||||
let hi = (int (Math.Floor(h / 60.0)))
|
|
||||||
let f = h / 60.0 - Math.Floor(h / 60.0)
|
|
||||||
let value = v * 255.0
|
|
||||||
|
|
||||||
let vv = (int value)
|
|
||||||
let p = (int (value * (1.0-s)))
|
|
||||||
let q = (int (value * (1.0-f*s)))
|
|
||||||
let t = (int (value * (1.0-(1.0-f) * s)))
|
|
||||||
|
|
||||||
match hi with
|
|
||||||
| 0 -> Color.FromArgb(255, vv, t, p)
|
|
||||||
| 1 -> Color.FromArgb(255, q, vv, p)
|
|
||||||
| 2 -> Color.FromArgb(255, p, vv, t)
|
|
||||||
| 3 -> Color.FromArgb(255, p, q, vv)
|
|
||||||
| 4 -> Color.FromArgb(255, t, p, vv)
|
|
||||||
| _ -> Color.FromArgb(255, vv, p, q)
|
|
||||||
*)
|
|
||||||
|
|
||||||
|
|
||||||
let getComplexValueForPixel x y height width zoom =
|
let getComplexValueForPixel x y height width zoom =
|
||||||
Complex ((x-width/2.0)/zoom, (y-height/2.0)/zoom)
|
Complex ((x-width/2.0)/zoom, (y-height/2.0)/zoom)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue