diff --git a/Code/Farbaenderung.py b/Code/Farbaenderung.py index 6115f0c..f292d31 100644 --- a/Code/Farbaenderung.py +++ b/Code/Farbaenderung.py @@ -9,10 +9,10 @@ def gammaCorrection(v): def reverseGammaCorrection(v_reverse): - if v_reverse <= 0.0031308: - return round(255 * (12.92 * v_reverse)) - elif v_reverse > 0.0031308: - return round(255 * (1.055 * v_reverse ** 0.41666 - 0.055)) + if abs(v_reverse) <= 0.0031308: + return round(255 * (12.92 * abs(v_reverse))) + elif abs(v_reverse) > 0.0031308: + return round(255 * (1.055 * abs(v_reverse) ** 0.41666 - 0.055)) class Dyschromasie: diff --git a/Code/__pycache__/Farbaenderung.cpython-38.pyc b/Code/__pycache__/Farbaenderung.cpython-38.pyc index 5b3ec02..a11005a 100644 Binary files a/Code/__pycache__/Farbaenderung.cpython-38.pyc and b/Code/__pycache__/Farbaenderung.cpython-38.pyc differ