mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Saturation & Brightness/Value Gain using Oklab color space (#1477)
* Imported Oklab reference implementation * Add Okhsv conversions * Fixed formatting error * Add saturation and value gain to schemas * Add english translation for saturation, value gain * Created OkhsvTransform * Make OkhsvTransform configurable * Apply OkhvsTransform * Clamped values during transform * Precalculate isIdentity in OkhsvTransform * Skip OkhsvTransform if it is the identity function * Added changelog message * Allow for full desaturation * Imported recommended changes by LordGrey * Fixed typo in constant * Fixed anti-pattern in ok_color.h * Correct indentions * Correct remote-control * Limited maximum gain settings to practical range * Renane valueGain to brightnessGain for clarity and understanding Co-authored-by: LordGrey <lordgrey.emmel@gmail.com>
This commit is contained in:
@@ -56,10 +56,20 @@ $(document).ready(function () {
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (sColor[key].key == "brightness" || sColor[key].key == "brightnessCompensation" || sColor[key].key == "backlightThreshold")
|
||||
property = '<div class="input-group"><input id="cr_' + sColor[key].key + '" type="number" class="form-control" min="0" max="100" step="10" value="' + value + '"/><span class="input-group-addon">' + $.i18n("edt_append_percent") + '</span></div>';
|
||||
else
|
||||
if (sColor[key].key == "brightness" ||
|
||||
sColor[key].key == "brightnessCompensation" ||
|
||||
sColor[key].key == "backlightThreshold" ||
|
||||
sColor[key].key == "saturationGain" ||
|
||||
sColor[key].key == "brightnessGain") {
|
||||
|
||||
property = '<input id="cr_' + sColor[key].key + '" type="number" class="form-control" min="' + sColor[key].minimum + '" max="' + sColor[key].maximum + '" step="' + sColor[key].step + '" value="' + value + '"/>';
|
||||
if (sColor[key].append === "edt_append_percent") {
|
||||
property = '<div class="input-group">' + property + '<span class="input-group-addon">' + $.i18n("edt_append_percent") + '</span></div>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
property = '<input id="cr_' + sColor[key].key + '" type="number" class="form-control" min="0.1" max="4.0" step="0.1" value="' + value + '"/>';
|
||||
}
|
||||
|
||||
$('.crtbody').append(createTableRow([title, property], false, true));
|
||||
$('#cr_' + sColor[key].key).off().on('change', function (e) {
|
||||
@@ -134,7 +144,7 @@ $(document).ready(function () {
|
||||
owner = $.i18n('remote_color_label_color') + ' ' + '<div style="width:18px; height:18px; border-radius:20px; margin-bottom:-4px; border:1px grey solid; background-color: rgb(' + value + '); display:inline-block" title="RGB: (' + value + ')"></div>';
|
||||
break;
|
||||
case "IMAGE":
|
||||
owner = $.i18n('remote_effects_label_picture') + (owner !== undefined ? (' ' + owner): "");
|
||||
owner = $.i18n('remote_effects_label_picture') + (owner !== undefined ? (' ' + owner) : "");
|
||||
break;
|
||||
case "GRABBER":
|
||||
owner = $.i18n('general_comp_GRABBER') + ': (' + owner + ')';
|
||||
@@ -153,8 +163,7 @@ $(document).ready(function () {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(duration && duration < 0))
|
||||
{
|
||||
if (!(duration && duration < 0)) {
|
||||
if (duration && compId != "GRABBER" && compId != "FLATBUFSERVER" && compId != "PROTOSERVER")
|
||||
owner += '<br/><span style="font-size:80%; color:grey;">' + $.i18n('remote_input_duration') + ' ' + duration.toFixed(0) + $.i18n('edt_append_s') + '</span>';
|
||||
|
||||
@@ -386,7 +395,6 @@ $(document).ready(function () {
|
||||
$('#effect_row').hide();
|
||||
}
|
||||
|
||||
|
||||
// interval updates
|
||||
|
||||
$(window.hyperion).on('components-updated', function (e, comp) {
|
||||
@@ -415,3 +423,4 @@ $(document).ready(function () {
|
||||
|
||||
removeOverlay();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user