def METHOD_NAME(lnst_config):
    for preset_name in PRESETS:
        preset = lnst_config.get_option("colours", preset_name)
        if preset == None:
            continue
        fg, bg, bf = preset
        extended_re = "^extended\([0-9]+\)$"
        if fg == "default":
            fg = None
        elif not re.match(extended_re, fg) and fg not in list(COLOURS.keys()):
            raise Exception("Colour '%s' not supported" % fg)
        if bg == "default":
            bg = None
        elif not re.match(extended_re, bg) and bg not in list(COLOURS.keys()):
            raise Exception("Colour '%s' not supported" % bg)
        PRESETS[preset_name] = [fg, bg, bool_it(bf)]