schrodinger.ui.qt.standard.colors module¶
-
class
schrodinger.ui.qt.standard.colors.
NativeColors
[source]¶ Bases:
object
-
BLACK
= '#000000'¶
-
GRAY
= '#808080'¶
-
GREEN
= '#00ff00'¶
-
ORANGE
= '#ffa500'¶
-
RED
= '#ff0000'¶
-
WHITE
= '#ffffff'¶
-
-
class
schrodinger.ui.qt.standard.colors.
LightModeColors
[source]¶ Bases:
schrodinger.ui.qt.standard.colors.NativeColors
-
INVALID_STATE_BORDER
= '#ff0000'¶
-
STANDARD_BACKGROUND
= '#ffffff'¶
-
STANDARD_BORDER
= '#ffffff'¶
-
LINK
= '#2e9cdc'¶
-
LINK_HOVERED
= '#34b0f8'¶
-
LINK_DISABLED
= '#acb8bf'¶
-
LINK_PRESSED
= '#2e9cdc'¶
-
EMPHASIZED_TEXT
= '#555555'¶
-
ERROR_TEXT
= '#cc0000'¶
-
HEADER_TEXT
= '#666666'¶
-
GOOD_TEXT
= '#336622'¶
-
INFORMATIONAL_TEXT
= '#666666'¶
-
LONG_ERROR_TEXT
= '#990000'¶
-
STANDARD_TEXT
= '#000000'¶
-
SUCCESS_TEXT
= '#006633'¶
-
WARNING_TEXT
= '#c87c00'¶
-
DISABLED_BUTTON_BACKGROUND
= '#cccccc'¶
-
DISABLED_BUTTON_COLOR
= '#eeeeee'¶
-
DISABLED_BUTTON_BORDER
= '#cccccc'¶
-
HIGHLIGHTED_BUTTON_BACKGROUND
= 'qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #96b260, stop:1 #87a056)'¶
-
HIGHLIGHTED_BUTTON_BORDER_DISABLED
= '#bbbbbb'¶
-
HIGHLIGHTED_BUTTON_BORDER_ENABLED
= '#989898'¶
-
HIGHLIGHTED_BUTTON_COLOR
= '#ffffff'¶
-
HIGHLIGHTED_PRESSED_BUTTON_BACKGROUND_COLOR
= '#87a056'¶
-
STANDARD_BUTTON_BACKGROUND
= 'qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #dddddd, stop:1 #cccccc)'¶
-
STANDARD_BUTTON_BORDER_DISABLED
= '#bbbbbb'¶
-
STANDARD_BUTTON_BORDER_ENABLED
= '#989898'¶
-
STANDARD_BUTTON_COLOR
= '#000000'¶
-
STANDARD_PRESSED_BUTTON_BACKGROUND_COLOR
= '#aaaaaa'¶
-
PRESSED_BUTTON_COLOR
= '#ffffff'¶
-
BLACK
= '#000000'¶
-
GRAY
= '#808080'¶
-
GREEN
= '#00ff00'¶
-
ORANGE
= '#ffa500'¶
-
RED
= '#ff0000'¶
-
WHITE
= '#ffffff'¶
-
-
class
schrodinger.ui.qt.standard.colors.
DarkModeColors
[source]¶ Bases:
schrodinger.ui.qt.standard.colors.NativeColors
-
LINK
= '#34b0f8'¶
-
LINK_HOVERED
= '#2e9cdc'¶
-
LINK_DISABLED
= '#798084'¶
-
LINK_PRESSED
= '#34b0f8'¶
-
BLACK
= '#000000'¶
-
GRAY
= '#808080'¶
-
GREEN
= '#00ff00'¶
-
ORANGE
= '#ffa500'¶
-
RED
= '#ff0000'¶
-
WHITE
= '#ffffff'¶
-
-
schrodinger.ui.qt.standard.colors.
get_luma
(rgb)[source]¶ Return the luma value of the given color.
See http://24ways.org/2010/calculating-color-contrast/ and http://www.w3.org/TR/AERT#color-contrast for additional information.
- Parameters
rgb (tuple[int]) – Red, green, blue values (range 0-255). Rgba values are allowed but alpha is ignored.
- Returns
Luma value (range 0-255)
- Return type
int
-
schrodinger.ui.qt.standard.colors.
is_color_dark
(rgb)[source]¶ For a given color, return whether it is dark. If a background color is dark, it should have a light foreground color and vice versa. :note: This is determined using the luma value of the given color. The
function returns True if the luma is less than 50% (i.e. closer to black than white) and False if the luma is greater than 50% (i.e. closer to white than black).
- Parameters
rgb (tuple[int]) – Red, green, blue values (range 0-255). Rgba values are allowed but alpha is ignored.
- Returns
Whether the color is dark
- Return type
bool