From 96198dae55b1429449504e49065a10763b288431 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Thu, 5 Jan 2023 19:25:45 +0100 Subject: Normalize color storage Colors are now normalized to 0 - 1 values instead of 0 - 255 causes calculations to be simpler and generally cleans up the codebase. --- src/config/ConfigDataValues.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/config/ConfigDataValues.hpp') diff --git a/src/config/ConfigDataValues.hpp b/src/config/ConfigDataValues.hpp index 27965556..c7f7fff8 100644 --- a/src/config/ConfigDataValues.hpp +++ b/src/config/ConfigDataValues.hpp @@ -17,7 +17,7 @@ interface ICustomConfigValueData { class CGradientValueData : public ICustomConfigValueData { public: CGradientValueData(CColor col) { - m_vColors.push_back(col * (1.f / 255.f)); + m_vColors.push_back(col); }; virtual ~CGradientValueData(){}; @@ -27,7 +27,7 @@ class CGradientValueData : public ICustomConfigValueData { void reset(CColor col) { m_vColors.clear(); - m_vColors.emplace_back(col * (1.f / 255.f)); + m_vColors.emplace_back(col); m_fAngle = 0; } -- cgit v1.2.3