Skip to content

Commit 6d115df

Browse files
authored
Simplify saturation function colorMode assignment
1 parent 4e08d08 commit 6d115df

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/color/creating_reading.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,13 +1237,7 @@ function creatingReading(p5, fn){
12371237
* </div>
12381238
*/
12391239
fn.saturation = function(c) {
1240-
const colorMode = (
1241-
this._renderer.states.colorMode === HSB ||
1242-
this._renderer.states.colorMode === HSL
1243-
) ?
1244-
this._renderer.states.colorMode :
1245-
HSL;
1246-
1240+
const colorMode = (this._renderer.states.colorMode === HSB) ? HSB : HSL;
12471241
return this.color(c)._getSaturation(
12481242
this._renderer.states.colorMaxes[colorMode][1]
12491243
);

0 commit comments

Comments
 (0)