Previous topic

API

Next topic

qarbon.config

This Page

qarbon.color

Helper functions to translate state to color.

Functions

getBgColorFromState Returns the background color for the given state:
getCSSColorFromState Returns a CSS string representing the color for the given state.
getColorFromState Returns the background a foreground color for the given state:
getFgColorFromState Returns the foreground color for the given state:
getStateColorMap Returns the map used for color states.
qarbon.color.getStateColorMap()[source]

Returns the map used for color states.

dict<State, tuple<bg color(tuple<R (int), G (int), B (int)>, A (int)>), fg color(tuple<R (int), G (int), B (int), A (int)>)>>

Returns:map of the state colors
Return type:dict
qarbon.color.getColorFromState(state)[source]

Returns the background a foreground color for the given state:

tuple<bg color(tuple<R (int), G (int), B (int)>, A (int)>), fg color(tuple<R (int), G (int), B (int), A (int)>)> :return: background a foreground color for the given state :rtype: tuple

qarbon.color.getCSSColorFromState(state)[source]

Returns a CSS string representing the color for the given state.

Returns:a CSS string representing the color for the given state
Return type:str
qarbon.color.getBgColorFromState(state)[source]

Returns the background color for the given state: tuple<R (int), G (int), B (int)>, A (int)>

Returns:the background color for the given state
Return type:tuple
qarbon.color.getFgColorFromState(state)[source]

Returns the foreground color for the given state: tuple<R (int), G (int), B (int)>, A (int)>

Returns:the foreground color for the given state
Return type:tuple