Skip to content

Commit 61c828b

Browse files
committed
fixed range problem for changeBrushColor function
1 parent d4c6e78 commit 61c828b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/renderers/RealDrawBoard/tools/gradientBrush.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export function _doStroke(
3535
) {
3636
hue = (hue+1)%360;
3737
gradientColors = convertHSLToRGB(hue,90,40);
38-
// this.changeBrushColor(gradientColors);
3938
this._plot(coords[0], coords[1], this.brushSize, gradientColors);
4039
this._stroke(coords[0], coords[1], this.brushSize, gradientColors, identifier);
4140
}

src/util/convertForm.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ export function convertHSLToRGB(h: number, s: number, l: number) :[ number ,numb
5555
r = c; g = 0; b = x;
5656
}
5757

58-
r = Math.round((r + m) * 255);
59-
g = Math.round((g + m) * 255);
60-
b = Math.round((b + m) * 255);
58+
r = Math.round((r + m));
59+
g = Math.round((g + m));
60+
b = Math.round((b + m));
6161

6262
return [ r ,g ,b ];
6363
}

0 commit comments

Comments
 (0)