l

-- Interpolate between two numbers
interpolate = (pct, min, max) ->
  if pct <= 0 then min elseif pct >= 1 then max else pct * (max - min) + min

-- Interpolate between two colour values, given in either style definition or style override format
-- Return in style override format
interpolate_color = (pct, first, last) ->
  r1, g1,<FILL-HERE>colour
-- Return in style override format
interpolate_alpha = (pct, first, last) ->
  ass_alpha interpolate pct, select(4, extract_color first), select(4, extract_color last)

{ :copy, :deep_copy, :ass_color, :ass_alpha, :ass_style_color,
  :extract_color, :alpha_from_style, :color_from_style, :HSV_to_RGB,
  :HSL_to_RGB, :trim, :headtail, :words, :clamp, :interpolate,
  :interpolate_color, :interpolate_alpha }

<fim-prefix>l

-- Interpolate between two numbers
interpolate = (pct, min, max) ->
  if pct <= 0 then min elseif pct >= 1 then max else pct * (max - min) + min

-- Interpolate between two colour values, given in either style definition or style override format
-- Return in style override format
interpolate_color = (pct, first, last) ->
  r1, g1,<fim-suffix>colour
-- Return in style override format
interpolate_alpha = (pct, first, last) ->
  ass_alpha interpolate pct, select(4, extract_color first), select(4, extract_color last)

{ :copy, :deep_copy, :ass_color, :ass_alpha, :ass_style_color,
  :extract_color, :alpha_from_style, :color_from_style, :HSV_to_RGB,
  :HSL_to_RGB, :trim, :headtail, :words, :clamp, :interpolate,
  :interpolate_color, :interpolate_alpha }
<fim-middle> b1 = extract_color first
  r2, g2, b2 = extract_color last
  r, g, b = interpolate(pct, r1, r2), interpolate(pct, g1, g2), interpolate(pct, b1, b2)
  ass_color r, g, b

-- Interpolate between two alpha values, given either in style override or as part as a style definition 
 b1, a1 ->
  r2, g2, b2, a2 ->
  r1 + (r2 - r1) * pct, g1 + (g2 - g1) * pct, b1 + (b2 - b1) * pct, a1 + (a2 - a1) * pct

-- Interpolate between two alpha values, given in either style definition or style override format
-- Return in style override format
interpolate_alpha = (pct, first, last) ->
  ass_alpha interpolate pct, select(4, extract_alpha first), select(4, extract_alpha last)

{ :copy, :deep_copy, :ass_color, :ass_alpha, :ass_style_color,
  :extract_color, :alpha_from_style, :color_from_style, :HSV_to_RGB,
  :HSL_to_RGB, :trim, :headtail, :words, :clamp, :interpolate,
  :interpolate_color, :interpolate_alpha }

{ :copy, :deep_copy, :ass_color, :ass_alpha, :ass_style_color,
  :extract_color, :alpha_from_style, :color_from_style, :HSV_to_RGB,
  :HSL_to_RGB, :trim, :headtail, :words, :clamp, :interpolate,
  :interpolate_color, :interpolate_alpha }

{ :copy, :deep_copy, :ass_color, :ass_alpha, :ass_style_color,
  :extract_color, :alpha_from_style, :color_from_style, :HSV_to_RGB,
  :HSL_to_RGB, :trim, :headtail, :words, :clamp, :interpolate,
  :interpolate_color, :interpolate_alpha }

{ :copy, :deep_copy, :ass_color, :ass_alpha, :ass_style_color,
  :extract_color, :alpha_from_style, :color_from_style, :HSV_to_RGB,
  :HSL_to_RGB, :trim, :headtail, :words, :clamp, :interpolate,
  :interpolate_color, :interpolate_alpha }

{ :copy, :deep_copy, :as