### Method

# Gimp RGB parse_hex

#### Declaration [src]

    gboolean
    gimp_rgb_parse_hex (
      GimpRGB* rgb,
      const gchar* hex,
      gint len
    )

#### Description [src]

Attempts to parse a string describing an RGB color in hexadecimal notation (optionally prefixed with a ‘#’).

This function does not touch the alpha component of `rgb`.

Available since: | 2.2

#### Parameters

`hex` | An array of `gchar`
| A string describing a color in hexadecimal notation.
| The length of the array is specified in the `len` argument.
| The data is owned by the caller of the function.
| Each element is a NUL terminated UTF-8 string.
`len` | `gint`
| The length of `hex`, in bytes. or -1 if `hex` is nul-terminated.

#### Return value

Returns: | `gboolean`
| `TRUE` if `hex` was parsed successfully and `rgb` has been set, `FALSE` otherwise.