### Method

# Gimp Gradient segment_get_right_color

since: 2.2

#### Declaration [src]

    GeglColor*
    gimp_gradient_segment_get_right_color (
      GimpGradient* gradient,
      gint segment
    )

#### Description [src]

Gets the right endpoint color of the segment

Gets the color of the right endpoint color of the segment of the gradient. Returns an error when the segment index is out of range.

Available since: 2.2

#### Parameters

`segment`

  Type: `gint`

  The index of a segment within the gradient.

#### Return value

Type: `GeglColor`

The return color.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.