Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Fix color space of the blended color when picking
Dmitry Kazakovbab4800a807d
diff --git a/libs/ui/tool/kis_tool_utils.cpp b/libs/ui/tool/kis_tool_utils.cppindex 3ecdfd898b..e2186697b1 100644--- a/libs/ui/tool/kis_tool_utils.cpp+++ b/libs/ui/tool/kis_tool_utils.cpp@@ -90,11 +90,14 @@ namespace KisToolUtils {// Color blending.if (!pure && blendColor && blend < 100) {+ KoColor effectiveBlendColor = *blendColor;+ effectiveBlendColor.convertTo(dev->colorSpace());+//Scale from 0..100% to 0..255 range for mixOp weights.quint8 blendScaled = static_cast<quint8>(blend * 2.55f);const quint8 *colors[2];- colors[0] = blendColor->data();+ colors[0] = effectiveBlendColor.data();colors[1] = sampledColor.data();qint16 weights[2];weights[0] = 255 - blendScaled;