# Gimp.RGB.parse_hex

    @accepts(Gimp.RGB, [unicode], int)
    @returns(bool)
    def parse_hex(self, hex, len):
        # Python wrapper for gimp_rgb_parse_hex()

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 self.

Since 2.2

self

  a Gimp.RGB struct used to return the parsed color

hex

  a string describing a color in hexadecimal notation

len

  the length of hex, in bytes. or -1 if hex is nul-terminated

Returns