diff options
author | cyfraeviolae <cyfraeviolae> | 2024-01-20 02:05:58 -0500 |
---|---|---|
committer | cyfraeviolae <cyfraeviolae> | 2024-01-20 02:05:58 -0500 |
commit | fe2adaec438a8d417db06a9e1f5f30de336d9290 (patch) | |
tree | 137d1163fcc20f48a22023532d67395ed045e71b /static | |
parent | 70f3c68da801bc3509123bad5d25d4f107de7fc2 (diff) |
adjust contrast/saturation
Diffstat (limited to 'static')
-rw-r--r-- | static/script.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/static/script.js b/static/script.js index b62d034..a800e5d 100644 --- a/static/script.js +++ b/static/script.js @@ -60,10 +60,9 @@ var queryTypes = [ return 'contrast(' + attrs.get("contrast") + '%)' }, generateDefaultAttrs: function() { - var r = randomInt(50, 100); - var mid = r + 50; - var lowerBound = r; - var upperBound = r + 100; + var mid = randomInt(75, 125); + var lowerBound = mid - 25; + var upperBound = mid + 25; return new Map([["contrast", mid], ["contrastLowerBound", lowerBound], ["contrastUpperBound", upperBound]]); }, generateInputId: function(id) { @@ -91,10 +90,9 @@ var queryTypes = [ return 'saturate(' + attrs.get("saturation") + '%)' }, generateDefaultAttrs: function() { - var r = randomInt(50, 100); - var mid = r + 50; - var lowerBound = r; - var upperBound = r + 100; + var mid = randomInt(75, 125); + var lowerBound = mid - 25; + var upperBound = mid + 25; return new Map([["saturation", mid], ["saturationLowerBound", lowerBound], ["saturationUpperBound", upperBound]]); }, generateInputId: function(id) { |