Can this be achieved by Google Sheets conditional formatting feature?
Just type in a function yielding a number for each cell colour you want to use, and set the text colour to none, like:
This will yield 1 if the date on line 3 is between those of columns D and E, and zero otherwise.
Create a demo sheet.
2018-06-23 2018-06-24 2018-06-25 2018-06-26 2018-06-27 2018-06-28 2018-06-29
Conditional formatting custom formula:
All of C2:I will be formatted according to the dates in A2:B.