Skip to content

Commit

Permalink
added support for color convertable types other than lists
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomGamingDev committed Sep 17, 2024
1 parent 158a8bc commit 3ea6ae0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/color/creating_reading.js
Original file line number Diff line number Diff line change
Expand Up @@ -1008,10 +1008,10 @@ p5.prototype.hue = function(c) {
p5.prototype.lerpColor = function(c1, c2, amt) {
p5._validateParameters('lerpColor', arguments);

if (Array.isArray(c1)) {
if (!(c1 instanceof p5.Color)) {
c1 = color(c1);
}
if (Array.isArray(c2)) {
if (!(c2 instanceof p5.Color)) {
c2 = color(c2);
}

Expand Down

0 comments on commit 3ea6ae0

Please sign in to comment.