Skip to content

Colors

This module provides you with a set of predefined colors that you can use to set the color of a drawable. The colors are stored as Color objects and can be used with the setColor method of a drawable.

You can import this object with:

from mosaico import colors

The colors are stored as constants in the module and can be accessed like this:

text = widget.createText()
text.setColor(colors.red)

Available colors

  • red
  • green
  • blue
  • white
  • black
  • yellow
  • cyan
  • magenta
  • orange
  • darkOrange
  • purple
  • pink
  • lime
  • brown
  • maroon
  • olive
  • navy