# GimpUi.cairo_set_source_color

    function cairo_set_source_color(cr: cairo.Context, color: Gegl.Color, config: Gimp.ColorConfig, softproof: Boolean, widget: Gtk.Widget): void {
        // Gjs wrapper for gimp_cairo_set_source_color()
    }

Sets color as the source pattern within cr, taking into account the profile of the [class@Gdk.Monitor] which widget is displayed on.

If config is set, the color configuration as set by the user will be used, in particular using any custom monitor profile set in preferences (overriding system-set profile). If no such custom profile is set, it will use the profile of the monitor widget is displayed on and will default to sRGB if widget is null.

Use [func@Gimp.get_color_configuration] to retrieve the user [class@Gimp.ColorConfig].

TODO: softproof is currently unused.

Since 3.0

cr

  Cairo context.

color

  the [class@Gegl.Color] to use as source pattern within cr.

config

  the color management settings.

softproof

  whether the color must also be soft-proofed.

widget

  [class@Gtk.Widget] to draw the focus indicator on.