Color ColorDistance::addColorsAndClamp(const Color& first, const Color& second) { return Color(clampColorValue(first.red() + second.red()), clampColorValue(first.green() + second.green()), clampColorValue(first.blue() + second.blue())); }
Color ColorDistance::addToColorAndClamp(const Color& color) const { return Color(clampColorValue(color.red() + m_redDiff), clampColorValue(color.green() + m_greenDiff), clampColorValue(color.blue() + m_blueDiff)); }
Color ColorDistance::clampColor(int red, int green, int blue, int alpha) { return Color(clampColorValue(red), clampColorValue(green), clampColorValue(blue), clampColorValue(alpha)); }