API Documentation

Documentation for developing SailfishOS applications

ColorPicker QML Type

A grid of colors for selecting a color More...

Import Statement: import Sailfish.Silica 1.0

Properties

Detailed Description

ColorPicker allows the user to pick a color value from a grid of platform-style colors. Tapping a grid item selects the color.

Platform-style colors are useful when color-coding content items and content categories. For example, a Calendar application can use colors to differentiate between multiple calendar backends.

Here is a simple color picker:

 import QtQuick 2.2
 import Sailfish.Silica 1.0

 ColorPicker {
     width: 300
     height: 300

     onColorChanged: {
         console.log("You selected:", color)
     }
 }

See also ColorPickerDialog.

Property Documentation

color : color

The color value picked by the user. The default value is null.

See also colors.


colors : var

An array of color values displayed to the user. By default the array follows a harmonic set of platform-style colors.

See also color.


We use cookies to improve your user experience and to help us to develop our services. By continuing to browse the site, you approve of our use of cookies.