Predefined Functions – lum
Function name: | lum – Return luminance of argument |
Synopsis: | lum(c) |
Input data type | Output data type |
---|---|
color | real |
Description:
This function takes a color variable as input and returns the luminance of the color. The luminance of a color is always between 0 and 1. For more information about hue, saturation and luminance see HSL Colorspace.
Colors can be created by using one of the color creation functions:
Internally colors are stored in RGBA format. So in order to return the luminance of a color, this function needs to do a color space conversion, which is quite slow.