def __setColorsSchemes(self): colors = GuiColorsLoader.load() defaultSchemes = {} for name in colors.schemasNames(): if not name.startswith(settings.MARKERS_COLOR_SCHEME_PREFIX): continue defaultSchemes[name] = colors.getSubSchemeToFlash(name, GuiColorsLoader.DEFAULT_SUB_SCHEME) colorBlindSchemes = {} for name in colors.schemasNames(): if not name.startswith(settings.MARKERS_COLOR_SCHEME_PREFIX): continue colorBlindSchemes[name] = colors.getSubSchemeToFlash(name, GuiColorsLoader.COLOR_BLIND_SUB_SCHEME) self._parentObj.setColorsSchemes(defaultSchemes, colorBlindSchemes)
def __setColorsSchemes(self, isColorBlind): colors = GuiColorsLoader.load() defaultSchemes = {} for name in colors.schemasNames(): if not name.startswith(settings.MARKERS_COLOR_SCHEME_PREFIX): continue defaultSchemes[name] = colors.getSubSchemeToFlash(name, GuiColorsLoader.DEFAULT_SUB_SCHEME) colorBlindSchemes = {} for name in colors.schemasNames(): if not name.startswith(settings.MARKERS_COLOR_SCHEME_PREFIX): continue colorBlindSchemes[name] = colors.getSubSchemeToFlash(name, GuiColorsLoader.COLOR_BLIND_SUB_SCHEME) self.as_setColorSchemesS(defaultSchemes, colorBlindSchemes) self.as_setColorBlindS(isColorBlind)
def __init__(self): super(ColorSchemeManager, self).__init__() self.colors = GuiColorsLoader.load()
def __getCurrentColor(self, colorBlind): colors = GuiColorsLoader.load() scheme = colors.getSubScheme('areaBorder', 'color_blind' if colorBlind else 'default') color = scheme['rgba'] / 255 return color