Skip to content

Commit 03a02b0

Browse files
committed
Fix p5.Color._getRGBA not returning values in correct range in non-RGB mode
1 parent 73e8b0b commit 03a02b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/color/p5.Color.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ class Color {
471471

472472
_getRGBA(maxes=[1, 1, 1, 1]) {
473473
// Get colorjs maxes
474-
const colorjsMaxes = Color.#colorjsMaxes[this.mode];
474+
const colorjsMaxes = Color.#colorjsMaxes[RGB];
475475

476476
// Normalize everything to 0,1 or the provided range (map)
477477
let coords = structuredClone(to(this._color, 'srgb').coords);

0 commit comments

Comments
 (0)