diff --git a/plug-ins/script-fu/libscriptfu/scheme-wrapper.c b/plug-ins/script-fu/libscriptfu/scheme-wrapper.c index 35b719ae2c..6d1f0bf00c 100644 --- a/plug-ins/script-fu/libscriptfu/scheme-wrapper.c +++ b/plug-ins/script-fu/libscriptfu/scheme-wrapper.c @@ -1156,13 +1156,13 @@ script_fu_marshal_procedure_call (scheme *sc, if (sc->vptr->is_string (sc->vptr->pair_car (a))) { - if (! gimp_rgb_parse_css (&color, - sc->vptr->string_value (sc->vptr->pair_car (a)), - -1)) + gchar *color_string = sc->vptr->string_value (sc->vptr->pair_car (a)); + + if (! gimp_rgb_parse_css (&color, color_string, -1)) return script_type_error (sc, "color string", i, proc_name); gimp_rgb_set_alpha (&color, 1.0); - g_debug ("(%s)", sc->vptr->string_value (sc->vptr->pair_car (a))); + gimp_value_set_rgb (&value, &color); } else if (sc->vptr->is_list (sc, sc->vptr->pair_car (a)) && sc->vptr->list_length (sc, sc->vptr->pair_car (a)) == 3) diff --git a/plug-ins/script-fu/test/tests/PDB/channel/channel-attributes.scm b/plug-ins/script-fu/test/tests/PDB/channel/channel-attributes.scm index c15bebaa2c..5011291b14 100644 --- a/plug-ins/script-fu/test/tests/PDB/channel/channel-attributes.scm +++ b/plug-ins/script-fu/test/tests/PDB/channel/channel-attributes.scm @@ -26,11 +26,10 @@ ; color (assert `(gimp-channel-set-color ,testChannel "red")) -; effective -; FIXME, SF is broken, should be red +; effective, getter returns same color: red (assert `(equal? (car (gimp-channel-get-color ,testChannel)) - '(0 0 0))) + '(255 0 0))) ; opacity (assert `(gimp-channel-set-opacity ,testChannel 0.7))