From 428e65256e77d2939709b0dfe9c8a31c57a93369 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Sat, 14 Mar 2020 10:46:28 +0100 Subject: GPencil: Use Linear color instead of sRGB for Select Vertex Color The brush color is sRGB but the Vertex Color is linear. --- source/blender/editors/gpencil/gpencil_select.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/gpencil/gpencil_select.c') diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 175b7b8c196..12d4c7c4329 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -1693,8 +1693,9 @@ static int gpencil_select_vertex_color_exec(bContext *C, wmOperator *op) Brush *brush = paint->brush; bool done = false; - float hsv_brush[3], hsv_stroke[3]; - rgb_to_hsv_compat_v(brush->rgb, hsv_brush); + float hsv_brush[3], hsv_stroke[3], linear_color[3]; + srgb_to_linearrgb_v3_v3(linear_color, brush->rgb); + rgb_to_hsv_compat_v(linear_color, hsv_brush); /* Select any visible stroke that uses this color */ CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) { -- cgit v1.2.3