You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix edge case where color temp is reset to TEMPERATURE_ZERO in delta mode
This quirk is explained in the README. Basically if the brightness that's passed to
get_sct_for_screen() is less than or equal to zero, the temperature is 'set' to 0.
This means that if we were using delta mode to decrease the brightness, the temperature
information will be lost whenever the brightness becomes less than or equal to 0.
Before this commit, this would manifest itself by forcing the temperature to 700K.
For example, doing `xsct 6500 -1; xsct -d 0 1` would result in a red screen, even though
we didn't intend to change the color temperature.
Ideally, the temperature information should stay the same if we are only shifting the brightness
and we reach 0.0, but I couldn't think of a straightforward way to implement this.
Also add a fix to make sure temp and brightness are included when using the delta flag
Copy file name to clipboardexpand all lines: README.md
+4
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,10 @@ Test xsct using the following command:
120
120
xsct 3700 0.9 && xsct
121
121
~~~
122
122
123
+
# Quirks
124
+
125
+
- If the delta mode is used to decrease the brightness to below 0.0 and then increased above 0.0, the temperature will reset to 6500K, regardless of whatever it was before the brightness reached 0. This is because the temperature is reset to 0K when the brightness is set equal to or below 0.0 (to verify this, you can run `xsct 0 0.0; xsct`).
126
+
123
127
# Resources
124
128
125
129
The following website by Mitchell Charity provides a table for the conversion between black-body temperatures and color pixel values:
0 commit comments