-
-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color Calibration Web App #1797
base: master
Are you sure you want to change the base?
Conversation
|
||
function update_hyperion_adjustments() { | ||
hyperion_api(null, function(json){ | ||
CURRENT_ADJUSTMENT = json.info.adjustment[0]; |
Check warning
Code scanning / CodeQL
Missing variable declaration Warning
|
||
get_video(); | ||
//update_canvas(); | ||
}) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing script
WALL_COLOR = color; | ||
WALL_COLOR_LED.style.backgroundColor = color.hex; | ||
|
||
var hsl_tv = rgb_to_hsl(TV_COLOR.value[0], TV_COLOR.value[1], TV_COLOR.value[2]); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
WALL_COLOR_LED.style.backgroundColor = color.hex; | ||
|
||
var hsl_tv = rgb_to_hsl(TV_COLOR.value[0], TV_COLOR.value[1], TV_COLOR.value[2]); | ||
var hsl_wall = rgb_to_hsl(WALL_COLOR.value[0], WALL_COLOR.value[1], WALL_COLOR.value[2]); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
wall_rgb = WALL_COLOR.value.slice(0,3).map(function(n){return Math.max(n,1)}), | ||
tv_rgb_min = Math.max(1, Math.min(...tv_rgb)), | ||
wall_rgb_min = Math.max(1, Math.min(...wall_rgb)), | ||
tv_rgb_max = Math.max(1, Math.max(...tv_rgb)), |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
||
|
||
var rgb_multiplier = 1, | ||
accuracy_multiplier = []; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
||
if (CALIBRATION_MODE_AUTO == 'blue') { | ||
|
||
rgb_multiplier = tv_rgb[2] / wall_rgb[2]; |
Check warning
Code scanning / CodeQL
Useless assignment to local variable Warning
|
||
NEW_RGB[0] = Math.round(255 * tv_rgb[0] / wall_rgb[0]); | ||
NEW_RGB[1] = Math.round(Math.max(1, CURRENT_RGB[1]) * tv_rgb[1] / wall_rgb[1]); | ||
NEW_RGB[2] = Math.round(255 * tv_rgb[2] / wall_rgb[2]) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
// normalize new rgb | ||
|
||
var new_rgb_max = Math.max(...NEW_RGB), | ||
new_rgb_min = Math.min(...NEW_RGB); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
x = (x > 0.008856) ? Math.pow(x, 1/3) : (7.787 * x) + 16/116; | ||
y = (y > 0.008856) ? Math.pow(y, 1/3) : (7.787 * y) + 16/116; | ||
z = (z > 0.008856) ? Math.pow(z, 1/3) : (7.787 * z) + 16/116; | ||
return [(116 * y) - 16, 500 * (x - y), 200 * (y - z)] |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
Simple Web app for semi auto color calibration.
Instruction available here
Summary
What kind of change does this PR introduce? (check at least one)
If changing the UI of web configuration, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing setups:
The PR fulfills these requirements:
Fixes: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD
To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Other information: