purescript-contrib / purescript-colors

Convert, manipulate, analyze, blend, color scales, color schemes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve gradients

sharkdp opened this issue · comments

  • hslGradient should always take the shortest path along the "hue circle".
  • Add other types of gradients (rgbGradient, ..)
  • Provide interpolation functions:
data InterpolationMode = RGB | HSL

interpolate :: InterpolationMode -> Color -> Color -> Number -> Color
interpolate mode from to fraction = ...