Liri Fluid API

Color QML Type

Utility functions for colors. More...

Import Statement: import Fluid.Controls 1.1

Methods

Detailed Description

Utility functions to manipulate colors.

Method Documentation

color blend(color color1, color color2, real alpha)

Blend color1 and color2 together and set alpha to alpha.


bool isDarkColor(color color)

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


color lightDark(color background, color lightColor, color darkColor)

Select a color depending on whether background color is light or dark. Returns lightColor if background is a light color, otherwise returns darkColor.


real luminance(color color)

Calculate luminance of color.


color transparent(color color, real alpha)

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