How to fill with HEX color in p5.js

lerpColor() demands that its 1st & 2nd passed arguments to be of p5.Color datatype:

If options.Foreground & options.Background are an array or a number or even a color string, you can convert them to a p5.Color datatype by passing them as an argument for color():

Extra info about p5.Color:

2 Likes