How to use the orange3.Orange.canvas.canvas.items.utils.saturated function in Orange3

To help you get started, we’ve selected a few Orange3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BioDepot / BioDepot-workflow-builder / orange3 / Orange / canvas / canvas / items / nodeitem.py View on Github external
def setColor(self, color, selectedColor=None):
        """
        Set the widget color.
        """
        if selectedColor is None:
            selectedColor = saturated(color, 150)
        palette = create_palette(color, selectedColor)
        self.shapeItem.setPalette(palette)
github BioDepot / BioDepot-workflow-builder / orange3 / Orange / canvas / canvas / items / nodeitem.py View on Github external
def create_palette(light_color, color):
    """
    Return a new :class:`QPalette` from for the :class:`NodeBodyItem`.
    """
    palette = QPalette()

    palette.setColor(QPalette.Inactive, QPalette.Light, saturated(light_color, 50))
    palette.setColor(QPalette.Inactive, QPalette.Midlight, saturated(light_color, 90))
    palette.setColor(QPalette.Inactive, QPalette.Button, light_color)

    palette.setColor(QPalette.Active, QPalette.Light, saturated(color, 50))
    palette.setColor(QPalette.Active, QPalette.Midlight, saturated(color, 90))
    palette.setColor(QPalette.Active, QPalette.Button, color)
    palette.setColor(QPalette.ButtonText, QColor("#515151"))
    return palette
github BioDepot / BioDepot-workflow-builder / orange3 / Orange / canvas / canvas / items / nodeitem.py View on Github external
def create_palette(light_color, color):
    """
    Return a new :class:`QPalette` from for the :class:`NodeBodyItem`.
    """
    palette = QPalette()

    palette.setColor(QPalette.Inactive, QPalette.Light, saturated(light_color, 50))
    palette.setColor(QPalette.Inactive, QPalette.Midlight, saturated(light_color, 90))
    palette.setColor(QPalette.Inactive, QPalette.Button, light_color)

    palette.setColor(QPalette.Active, QPalette.Light, saturated(color, 50))
    palette.setColor(QPalette.Active, QPalette.Midlight, saturated(color, 90))
    palette.setColor(QPalette.Active, QPalette.Button, color)
    palette.setColor(QPalette.ButtonText, QColor("#515151"))
    return palette
github BioDepot / BioDepot-workflow-builder / orange3 / Orange / canvas / canvas / items / nodeitem.py View on Github external
def create_palette(light_color, color):
    """
    Return a new :class:`QPalette` from for the :class:`NodeBodyItem`.
    """
    palette = QPalette()

    palette.setColor(QPalette.Inactive, QPalette.Light, saturated(light_color, 50))
    palette.setColor(QPalette.Inactive, QPalette.Midlight, saturated(light_color, 90))
    palette.setColor(QPalette.Inactive, QPalette.Button, light_color)

    palette.setColor(QPalette.Active, QPalette.Light, saturated(color, 50))
    palette.setColor(QPalette.Active, QPalette.Midlight, saturated(color, 90))
    palette.setColor(QPalette.Active, QPalette.Button, color)
    palette.setColor(QPalette.ButtonText, QColor("#515151"))
    return palette
github BioDepot / BioDepot-workflow-builder / orange3 / Orange / canvas / canvas / items / nodeitem.py View on Github external
def create_palette(light_color, color):
    """
    Return a new :class:`QPalette` from for the :class:`NodeBodyItem`.
    """
    palette = QPalette()

    palette.setColor(QPalette.Inactive, QPalette.Light, saturated(light_color, 50))
    palette.setColor(QPalette.Inactive, QPalette.Midlight, saturated(light_color, 90))
    palette.setColor(QPalette.Inactive, QPalette.Button, light_color)

    palette.setColor(QPalette.Active, QPalette.Light, saturated(color, 50))
    palette.setColor(QPalette.Active, QPalette.Midlight, saturated(color, 90))
    palette.setColor(QPalette.Active, QPalette.Button, color)
    palette.setColor(QPalette.ButtonText, QColor("#515151"))
    return palette