'type - string, \'default\' or \'user\' theme type
themeName - string, theme name
Returns a dictionary which holds {option:value} for each element
in the specified theme. Values are loaded over a set of ultimate last
fallback defaults to guarantee that all theme elements are present in
a newly created theme.'

def GetThemeDict(self, type, themeName):

    if (type == 'user'):
        cfgParser = self.userCfg['highlight']
    elif (type == 'default'):
        cfgParser = self.defaultCfg['highlight']
    else:
        raise InvalidTheme, 'Invalid    theme    type    specified'
    theme = {'normal-foreground': '#000000', 'normal-background': '#ffffff', 'keyword-foreground': '#000000', 'keyword-background': '#ffffff', 'builtin-foreground': '#000000', 'builtin-background': '#ffffff', 'comment-foreground': '#000000', 'comment-background': '#ffffff', 'string-foreground': '#000000', 'string-background': '#ffffff', 'definition-foreground': '#000000', 'definition-background': '#ffffff', 'hilite-foreground': '#000000', 'hilite-background': 'gray', 'break-foreground': '#ffffff', 'break-background': '#000000', 'hit-foreground': '#ffffff', 'hit-background': '#000000', 'error-foreground': '#ffffff', 'error-background': '#000000', 'cursor-foreground': '#000000', 'stdout-foreground': '#000000', 'stdout-background': '#ffffff', 'stderr-foreground': '#000000', 'stderr-background': '#ffffff', 'console-foreground': '#000000', 'console-background': '#ffffff'}
    for element in theme.keys():
        if (not cfgParser.has_option(themeName, element)):
            warning = ('\n    Warning:    configHandler.py    -    IdleConf.GetThemeDict    -\n    problem    retrieving    theme    element    %r\n    from    theme    %r.\n    returning    default    value:    %r\n' % (element, themeName, theme[element]))
            try:
                sys.stderr.write(warning)
            except IOError:
                pass
        colour = cfgParser.Get(themeName, element, default=theme[element])
        theme[element] = colour
    return theme
