I've got it.
Code:
program:
arguments(date, colourA, colourB, colourC);
now = format_date(today(), 'yyyy-MM-dd');
if days_between(now,date) <= '1' then colourA
elif days_between(now,date) <= '7' then colourB
elif days_between(now,date) <= '14' then colourC fi
Code:
program:
colours_daysbetween($#lastread, '#1c7eff', '#538fff', '#2b5aa2')
(or I could use
(colourA='#1c7eff'), thoughI'm not sure there's any reason to do this unless I add more variables)