Color QML Type | Fluid Reference Documentation

- Fluid Reference Documentation
- Fluid 1.2.0

# Color QML Type

Utility functions for colors. More...

Import Statement: | import Fluid.Controls 1.1

- List of all members, including inherited members

## Methods

- color blend(color color1, color color2, real alpha)
- bool isDarkColor(color color)
- color lightDark(color background, color lightColor, color darkColor)
- real luminance(color color)
- color transparent(color color, real alpha)

## 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 a.

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 colors. Returns a new object, and does not modify the original color at all.