colors - Haskell RGB to CMYK -
rgb2cmyk r g b = ((w - (r/255))/w,(w - (g/255))/w,(w - (b/255))/w,k = 1 - w) w = max(r/255,g/255,b/255)
could please me code? no matter do, same failure "parse error on input '='"
don't use tabs, indentation significant in haskell, use spaces. following (max takes 2 arguments, maximum takes list).
rgb2cmyk r g b = ((w - (r/255))/w, (w - (g/255))/w, (w - (b/255))/w, 1 - w) w = maximum [r/255, g/255, b/255]
Comments
Post a Comment