API Documentation

Documentation for developing SailfishOS applications

ColorPickerPage QML Type

A page for selecting a color from a ColorPicker More...

Import Statement: import Sailfish.Silica 1.0




Detailed Description

The ColorPickerPage type presents a ColorPicker within a Page to allow a color to be selected. Tapping on a color in the picker will emit the colorClicked() signal.

Here is a simple color picker page, opened with PageStack::push():

 import QtQuick 2.2
 import Sailfish.Silica 1.0

 Page {
     Rectangle {
         id: colorIndicator
         color: "transparent"
         width: Theme.itemSizeSmall
         height: Theme.itemSizeSmall
     Button {
         id: button
         text: "Choose a color"

         onClicked: {
             var page = pageStack.push("Sailfish.Silica.ColorPickerPage")
             page.colorClicked.connect(function(color) {
                 colorIndicator.color = color

See also ColorPicker.

Property Documentation

color : color

The color value picked by the user.

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.

Signal Documentation

colorClicked(color color)

This signal is emitted when the user picks a color.

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.