Color QML Type
Utility functions for colors. More...
Import Statement: | import Fluid.Controls 1.1 |
Methods
- color blend(color1, color color2, real alpha)
- bool isDarkColor(color)
- color lightDark(background, color lightColor, color darkColor)
- real luminance(color)
- color transparent(color, real alpha)
Detailed Description
Utility functions to manipulate colors.
Method Documentation
color blend(color1, color color2, real alpha) |
Blend color1 and color2 together and set alpha to a.
bool isDarkColor(color) |
Returns true
if color is dark and should have light content on top.
color lightDark(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) |
Calculate luminance of color.
color transparent(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.