ae.enaml_app.functions

enaml application helper functions.

Functions

ae_rgba(color)

convert enaml Color instance into ae color format.

enaml_rgba(red, green, blue, alpha)

convert ae color rgba floats into enaml compatible rgba integers.

style_rgba(red, green, blue, alpha)

convert ae color rgba floats into Qt style compatible rgba color string.

ae_rgba(color)[source]

convert enaml Color instance into ae color format.

Parameters

color (Color) – enaml Color instance.

Return type

Tuple[float, float, float, float]

Returns

rgba tuple with 4 float values (0.0 … 1.0).

enaml_rgba(red, green, blue, alpha)[source]

convert ae color rgba floats into enaml compatible rgba integers.

Parameters
  • red (float) – red color value (0.0 … 1.0).

  • green (float) – green color value (0.0 … 1.0).

  • blue (float) – blue color value (0.0 … 1.0).

  • alpha (float) – alpha/opacity value (0.0 … 1.0).

Return type

Color

Returns

rgba enaml Color instance (0 … 255).

style_rgba(red, green, blue, alpha)[source]

convert ae color rgba floats into Qt style compatible rgba color string.

Parameters
  • red (float) – red color value (0.0 … 1.0).

  • green (float) – green color value (0.0 … 1.0).

  • blue (float) – blue color value (0.0 … 1.0).

  • alpha (float) – alpha/opacity value (0.0 … 1.0).

Return type

str

Returns

rgba enaml Color instance (0 … 255).