Skip to content

Commit 3ea6ae0

Browse files
added support for color convertable types other than lists
1 parent 158a8bc commit 3ea6ae0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/color/creating_reading.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,10 +1008,10 @@ p5.prototype.hue = function(c) {
10081008
p5.prototype.lerpColor = function(c1, c2, amt) {
10091009
p5._validateParameters('lerpColor', arguments);
10101010

1011-
if (Array.isArray(c1)) {
1011+
if (!(c1 instanceof p5.Color)) {
10121012
c1 = color(c1);
10131013
}
1014-
if (Array.isArray(c2)) {
1014+
if (!(c2 instanceof p5.Color)) {
10151015
c2 = color(c2);
10161016
}
10171017

0 commit comments

Comments
 (0)