From f1f461534ea83e037ed25af590731be7df6beffe Mon Sep 17 00:00:00 2001 From: MangaValk Date: Thu, 19 Nov 2026 16:06:18 +0100 Subject: [PATCH] Add thumb-wheel brightness slider to match the balanced zones Co-Authored-By: Claude Opus 5.5 --- MadCatz_RAT8Plus.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MadCatz_RAT8Plus.js b/MadCatz_RAT8Plus.js index 093bd9d..df9d4a8 100644 --- a/MadCatz_RAT8Plus.js +++ b/MadCatz_RAT8Plus.js @@ -21,6 +21,7 @@ shutdownMode:readonly shutdownColor:readonly colorCorrection:readonly whiteBalance:readonly +thumbBrightness:readonly */ export function ControllableParameters() { return [ @@ -28,6 +29,7 @@ export function ControllableParameters() { {property:"forcedColor", group:"lighting", label:"Forced Color", min:"0", max:"360", type:"color", default:"#009bde"}, {property:"colorCorrection", group:"lighting", label:"Colour Correction", description:"The LEDs respond linearly, so in-between colours look pale next to a screen. Higher values darken mid-tones and make colours richer", type:"combobox", values:["Off", "Light (1.8)", "Normal (2.2)", "Strong (2.8)"], default:"Normal (2.2)"}, {property:"whiteBalance", group:"lighting", label:"White Balance", description:"The scroll-wheel and logo LEDs have much weaker blue than the thumb-wheel LED, so colours there look pale and warm. Balanced trims their red and green to match (reds and greens get dimmer there)", type:"combobox", values:["Balanced", "Off"], default:"Balanced"}, + {property:"thumbBrightness", group:"lighting", label:"Thumb Wheel Brightness", description:"With White Balance on, the scroll wheel and logo are dimmer, so turn the thumb-wheel light down until all three match", type:"number", min:"0", max:"100", default:"40"}, {property:"shutdownMode", group:"lighting", label:"On Exit", description:"What the mouse shows when SignalRGB closes. 'Save last colours' stores them in the active profile (one storage write), so they survive replugging", type:"combobox", values:["Mouse's own lighting", "Shutdown Color", "Save last colours to mouse"], default:"Mouse's own lighting"}, {property:"shutdownColor", group:"lighting", label:"Shutdown Color", min:"0", max:"360", type:"color", default:"#000000"}, ]; @@ -45,7 +47,11 @@ const ZONE_BALANCE = [[0.15, 0.10, 1], [0.15, 0.10, 1], [1, 1, 1]]; function corrected(c, zone) { const g = GAMMA[colorCorrection] || 1; - const k = whiteBalance === "Off" ? [1, 1, 1] : ZONE_BALANCE[zone]; + let k = whiteBalance === "Off" ? [1, 1, 1] : ZONE_BALANCE[zone]; + if (whiteBalance !== "Off" && zone === 2) { + const t = Math.min(100, Math.max(0, Number(thumbBrightness))) / 100; + k = k.map(v => v * (isNaN(t) ? 0.4 : t)); + } return c.map((v, i) => Math.round(255 * Math.pow(v / 255, g) * k[i])); }