ChartDirector 5.1 (PHP Edition)
BaseChart.adjustBrightness
Usage
adjustBrightness(c, brightness)
Description
Creates a color that is a darkened or brightened version of the given color.
A brightness less than 1 means the color is darkened, while a brightness greater than 1 means the color is brightened. For example, a brightness of 0.5 means the color is half as bright as the original color. If the original color is red, the color will become dark red. Conversely, a brightness of 2 means the color is twice as bright as the original color. If the original color is red, the color will become light red.
Arguments
Argument | Default | Description |
c | (Mandatory) | The given color. |
brightness | (Mandatory) | A non-negative number represent the factor to darken or brighten the color. |
Return Value
A 32-bit integer representing the darkened or brightened color.
© 2014 Advanced Software Engineering Limited. All rights reserved.