How to use the enaml.colors.Color function in enaml

To help you get started, we’ve selected a few enaml 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 nucleic / enaml / tests / test_color.py View on Github external
def test_color_initialization():
    """Test the different initialization format supported by Color.

    """
    components = [1, 2, 3, 4]
    c = Color(*components)
    for name, value in zip(['red', 'green', 'blue', 'alpha'], components):
        assert getattr(c, name) == value

    c = Color(alpha=-1)
    for name in ['red', 'green', 'blue', 'alpha']:
        assert getattr(c, name) == 0

    assert c._tkdata is None

    try:
        from enaml.qt.q_resource_helpers import get_cached_qcolor
    except Exception:
        return
    get_cached_qcolor(c)
    assert c._tkdata is not None
github nucleic / enaml / enaml / widgets / dock_area_style.py View on Github external
def grey_wind_style():
    """ A mild grey and brown color scheme.

    Inspired by:
        http://www.colourlovers.com/palette/2866138/Grey_Wind

    """
    return DockAreaStyle(
        dock_area_background=Color(139, 131, 129),
        splitter_handle_background=Color(0, 0, 0, 0),
        dock_window_background=Color(175, 182, 190),
        dock_window_border=Color(144, 144, 152),
        dock_container_background=Color(175, 178, 183),
        dock_container_border=Color(144, 144, 152),
        dock_item_background=Color(244, 244, 244),
        title_bar_background=Color(144, 144, 152),
        title_bar_foreground=Color(244, 244, 244),
        title_bar_font='9pt "Segoe UI"',
        tab_background=Color(255, 255, 255, 35),
        tab_foreground=Color(244, 244, 244),
        tab_hover_background=Color(193, 191, 196),
        tab_hover_foreground=Color(70, 70, 70),
        tab_selected_background=Color(244, 244, 244),
        tab_selected_foreground=Color(0, 0, 0),
    )
github nucleic / enaml / enaml / widgets / dock_area_style.py View on Github external
""" A style which is inspired by Visual Studio 2010.

    """
    return DockAreaStyle(
        dock_area_background=Color(49, 67, 98),
        splitter_handle_background=Color(0, 0, 0, 0),
        dock_window_background=Color(53, 73, 106),
        dock_window_border=Color(40, 60, 90),
        dock_container_background=Color(53, 73, 106),
        dock_container_border=Color(40, 60, 90),
        dock_item_background=Color(240, 240, 240),
        title_bar_background=Color(77, 96, 130),
        title_bar_foreground=Color(250, 251, 254),
        title_bar_font='9pt "Segoe UI"',
        tab_background=Color(255, 255, 255, 15),
        tab_hover_background=Color(76, 105, 153),
        tab_selected_background=Color(240, 240, 240),
        tab_foreground=Color(250, 251, 254),
        tab_selected_foreground=Color(0, 0, 0),
    )
github nucleic / enaml / enaml / widgets / dock_area_style.py View on Github external
"""
    return DockAreaStyle(
        dock_area_background=Color(54, 57, 59),
        splitter_handle_background=Color(0, 0, 0, 0),
        dock_window_background=Color(197, 188, 142),
        dock_window_border=Color(105, 103, 88),
        dock_container_background=Color(62, 72, 75),
        dock_container_border=Color(54, 57, 59),
        dock_item_background=Color(240, 240, 240),
        title_bar_background=Color(105, 103, 88),
        title_bar_foreground=Color(244, 244, 244),
        title_bar_font='9pt "Segoe UI"',
        tab_background=Color(255, 255, 255, 30),
        tab_foreground=Color(244, 244, 244),
        tab_hover_background=Color(197, 188, 142),
        tab_selected_background=Color(240, 240, 240),
        tab_selected_foreground=Color(0, 0, 0),
    )
github nucleic / enaml / enaml / widgets / dock_area_style.py View on Github external
Inspired by:
        http://www.colourlovers.com/palette/90734/Newly_Risen_Moon

    """
    return DockAreaStyle(
        dock_area_background=Color(54, 57, 59),
        splitter_handle_background=Color(0, 0, 0, 0),
        dock_window_background=Color(197, 188, 142),
        dock_window_border=Color(105, 103, 88),
        dock_container_background=Color(62, 72, 75),
        dock_container_border=Color(54, 57, 59),
        dock_item_background=Color(240, 240, 240),
        title_bar_background=Color(105, 103, 88),
        title_bar_foreground=Color(244, 244, 244),
        title_bar_font='9pt "Segoe UI"',
        tab_background=Color(255, 255, 255, 30),
        tab_foreground=Color(244, 244, 244),
        tab_hover_background=Color(197, 188, 142),
        tab_selected_background=Color(240, 240, 240),
        tab_selected_foreground=Color(0, 0, 0),
    )
github nucleic / enaml / enaml / widgets / dock_area_style.py View on Github external
def metro_style():
    """ A style which is inspired by Windows Metro UIs.

    """
    return DockAreaStyle(
        dock_area_background=Color(0xca, 0xca, 0xca),
        splitter_handle_background=Color(0, 0, 0, 0),
        dock_window_background=Color(255, 255, 255),
        dock_window_border=Color(0x66, 0x66, 0x66),
        dock_container_background=Color(0xca, 0xca, 0xca),
        dock_container_border=Color(0x66, 0x66, 0x66),
        dock_item_background=Color(240, 240, 240),
        title_bar_background=Color(53, 139, 202),
        title_bar_foreground=Color(240, 240, 240),
        title_bar_font='9pt "Segoe UI"',
        tab_background=Color(0x66, 0x66, 0x66),
        tab_foreground=Color(240, 240, 240),
        tab_hover_background=Color(0xff, 0xfb, 0x85, 200),
        tab_hover_foreground=Color(0x33, 0x33, 0x33),
        tab_selected_background=Color(240, 240, 240),
        tab_selected_foreground=Color(0x33, 0x33, 0x33),
    )
github nucleic / enaml / enaml / widgets / dock_area_style.py View on Github external
Inspired by:
        http://www.colourlovers.com/palette/590207/d_a_y_d_r_e_a_m_e_r

    """
    return DockAreaStyle(
        dock_area_background=Color(168, 168, 120),
        splitter_handle_background=Color(0, 0, 0, 0),
        dock_window_background=Color(131, 144, 116),
        dock_window_border=Color(6, 16, 19),
        dock_container_background=Color(147, 158, 120),
        dock_container_border=Color(6, 16, 19),
        dock_item_background=Color(244, 244, 244),
        title_bar_background=Color(131, 144, 116),
        title_bar_foreground=Color(250, 250, 250),
        title_bar_font='9pt "Segoe UI"',
        tab_background=Color(255, 255, 255, 35),
        tab_foreground=Color(244, 244, 244),
        tab_hover_background=Color(205, 205, 118),
        tab_selected_background=Color(244, 244, 244),
        tab_selected_foreground=Color(6, 16, 19),
    )
github nucleic / enaml / enaml / widgets / dock_area_style.py View on Github external
dock_area_background=Color(139, 131, 129),
        splitter_handle_background=Color(0, 0, 0, 0),
        dock_window_background=Color(175, 182, 190),
        dock_window_border=Color(144, 144, 152),
        dock_container_background=Color(175, 178, 183),
        dock_container_border=Color(144, 144, 152),
        dock_item_background=Color(244, 244, 244),
        title_bar_background=Color(144, 144, 152),
        title_bar_foreground=Color(244, 244, 244),
        title_bar_font='9pt "Segoe UI"',
        tab_background=Color(255, 255, 255, 35),
        tab_foreground=Color(244, 244, 244),
        tab_hover_background=Color(193, 191, 196),
        tab_hover_foreground=Color(70, 70, 70),
        tab_selected_background=Color(244, 244, 244),
        tab_selected_foreground=Color(0, 0, 0),
    )
github nucleic / enaml / enaml / widgets / dock_area_style.py View on Github external
"""
    return DockAreaStyle(
        dock_area_background=Color(54, 57, 59),
        splitter_handle_background=Color(0, 0, 0, 0),
        dock_window_background=Color(197, 188, 142),
        dock_window_border=Color(105, 103, 88),
        dock_container_background=Color(62, 72, 75),
        dock_container_border=Color(54, 57, 59),
        dock_item_background=Color(240, 240, 240),
        title_bar_background=Color(105, 103, 88),
        title_bar_foreground=Color(244, 244, 244),
        title_bar_font='9pt "Segoe UI"',
        tab_background=Color(255, 255, 255, 30),
        tab_foreground=Color(244, 244, 244),
        tab_hover_background=Color(197, 188, 142),
        tab_selected_background=Color(240, 240, 240),
        tab_selected_foreground=Color(0, 0, 0),
    )
github nucleic / enaml / enaml / widgets / dock_area_style.py View on Github external
def metro_style():
    """ A style which is inspired by Windows Metro UIs.

    """
    return DockAreaStyle(
        dock_area_background=Color(0xca, 0xca, 0xca),
        splitter_handle_background=Color(0, 0, 0, 0),
        dock_window_background=Color(255, 255, 255),
        dock_window_border=Color(0x66, 0x66, 0x66),
        dock_container_background=Color(0xca, 0xca, 0xca),
        dock_container_border=Color(0x66, 0x66, 0x66),
        dock_item_background=Color(240, 240, 240),
        title_bar_background=Color(53, 139, 202),
        title_bar_foreground=Color(240, 240, 240),
        title_bar_font='9pt "Segoe UI"',
        tab_background=Color(0x66, 0x66, 0x66),
        tab_foreground=Color(240, 240, 240),
        tab_hover_background=Color(0xff, 0xfb, 0x85, 200),
        tab_hover_foreground=Color(0x33, 0x33, 0x33),
        tab_selected_background=Color(240, 240, 240),
        tab_selected_foreground=Color(0x33, 0x33, 0x33),
    )