Theme


Provides access to standard colors that follow the Material Design specification. More...
import Material 0.2
Properties and Methods

Detailed Description

Provides access to standard colors that follow the Material Design specification.

See http://www.google.com/design/spec/style/color.html#color-ui-color-application for details about choosing a color scheme for your application.

Properties

accentColor : color

The accent color complements the primary color, and is used for any primary action buttons along with switches, sliders, and other components that do not specifically set a color. This can be customized via the ApplicationWindow::theme group property. According to the Material Design guidelines, this should taken from a second color palette that complements the primary color palette at http://www.google.com/design/spec/style/color.html#color-color-palette.

backgroundColor : color

The default background color for the application.

dark : ThemePalette

Standard colors specifically meant for dark surfaces. This includes text colors along with a dark version of the accent color.

light : ThemePalette

Standard colors specifically meant for light surfaces. This includes text colors along with a light version of the accent color.

primaryColor : color

The primary color used for the toolbar background unless a page specifies its own color. This can be customized via the ApplicationWindow::theme group property. According to the Material Design guidelines, this should normally be a 500 color from one of the color palettes at http://www.google.com/design/spec/style/color.html#color-color-palette.

primaryDarkColor : color

A darker version of the primary color used for the window titlebar (if client-side decorations are not used), unless a Page specifies its own primary and primary dark colors. This can be customized via the ApplicationWindow::theme group property. According to the Material Design guidelines, this should normally be the 700 color version of your aplication's primary color, taken from one of the color palettes at http://www.google.com/design/spec/style/color.html#color-color-palette.

tabHighlightColor : color

The color of the higlight indicator for selected tabs. By default this is the accent color, but it can also be white (for a dark primary color/toolbar background).

Methods

alpha(color, alpha)

A utility method for changing the alpha on colors. Returns a new object, and does not modify the original color at all.

isDarkColor(background)

Returns true if the color is dark and should have light content on top

lightDark(background, lightColor, darkColor)

Select a color depending on whether the background is light or dark.

lightColor is the color used on a light background.

darkColor is the color used on a dark background.