Skip to content

Commit fe0d85a

Browse files
committed
Refactor out need for pInst in p5.Color
1 parent 3130090 commit fe0d85a

File tree

3 files changed

+418
-412
lines changed

3 files changed

+418
-412
lines changed

src/color/creating_reading.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ function creatingReading(p5, fn){
683683
}
684684

685685
const arg = Array.isArray(args[0]) ? args[0] : args;
686-
return new p5.Color(this, arg);
686+
return new p5.Color(arg, this._colorMode, this._colorMaxes);
687687
};
688688

689689
/**
@@ -1027,7 +1027,7 @@ function creatingReading(p5, fn){
10271027
space: c1.color.space.path[spaceIndex].id
10281028
})(amt);
10291029

1030-
return new p5.Color(this, lerpColor);
1030+
return new p5.Color(lerpColor, this._colorMode, this._colorMaxes);
10311031
};
10321032

10331033
/**

0 commit comments

Comments
 (0)