From ea6585a0b905cd7dac7f18fa6155d20d884999a0 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Mon, 23 Apr 2018 11:53:35 -0700 Subject: [PATCH] Corrected tosRGBFloat() computation. --- libraries/shared/src/ColorUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/shared/src/ColorUtils.h b/libraries/shared/src/ColorUtils.h index fd0bbdd8ab..e113449db3 100644 --- a/libraries/shared/src/ColorUtils.h +++ b/libraries/shared/src/ColorUtils.h @@ -102,7 +102,7 @@ inline float ColorUtils::tosRGBFloat(const float &linear) { } else if (0 < linear && linear < SRGB_ELBOW_INV) { sRGBValue = 12.92f * linear; } else if (SRGB_ELBOW_INV <= linear && linear < 1) { - sRGBValue = 1.055f * powf(linear, 0.41666f - 0.055f); + sRGBValue = 1.055f * powf(linear, 0.41666f) - 0.055f; } else { sRGBValue = 1.0f; }