Skip to content

Commit d6cd7e2

Browse files
committed
Updated color for dark theme
1 parent 44ff693 commit d6cd7e2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/FFT.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,16 @@ const FFT = forwardRef(
129129
const wglp = new WebglPlot(canvas);
130130
console.log("WebglPlot created:", wglp);
131131
wglp.gScaleY = Zoom;
132+
const lineColor = theme === "dark" ? new ColorRGBA(1, 2, 2, 1) : new ColorRGBA(0, 0, 0, 1); // Adjust colors as needed
132133

133-
const line = new WebglLine(new ColorRGBA(1, 2, 2, 1), dataPointCountRef.current);
134+
const line = new WebglLine(lineColor, dataPointCountRef.current);
134135
line.offsetY = 0;
135136
line.lineSpaceX(-1, 2 / dataPointCountRef.current);
136137
wglp.addLine(line);
137138
newWglPlots.push(wglp);
138-
console.log(newWglPlots)
139+
console.log(newWglPlots)
139140
linesRef.current = [line];
140-
wglPlotsref.current=[wglp];
141+
wglPlotsref.current = [wglp];
141142
setCanvasElements([canvas]);
142143
} catch (error) {
143144
console.error("Error creating WebglPlot:", error);

0 commit comments

Comments
 (0)