Add thumb-wheel brightness slider to match the balanced zones
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f4eb036a98
commit
f1f461534e
1 file changed
+7
-1
+7
-1
@@ -21,6 +21,7 @@ shutdownMode:readonly
|
|||||||
shutdownColor:readonly
|
shutdownColor:readonly
|
||||||
colorCorrection:readonly
|
colorCorrection:readonly
|
||||||
whiteBalance:readonly
|
whiteBalance:readonly
|
||||||
|
thumbBrightness:readonly
|
||||||
*/
|
*/
|
||||||
export function ControllableParameters() {
|
export function ControllableParameters() {
|
||||||
return [
|
return [
|
||||||
@@ -28,6 +29,7 @@ export function ControllableParameters() {
|
|||||||
{property:"forcedColor", group:"lighting", label:"Forced Color", min:"0", max:"360", type:"color", default:"#009bde"},
|
{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:"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:"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:"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"},
|
{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) {
|
function corrected(c, zone) {
|
||||||
const g = GAMMA[colorCorrection] || 1;
|
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]));
|
return c.map((v, i) => Math.round(255 * Math.pow(v / 255, g) * k[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user