Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
PgCalcColorContrast

PgCalcColorContrast

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

PgCalcColorContrast()

Compute light and dark colors to use for a gradient

Synopsis:

void PgCalcColorContrast( PgColor_t flat_color,
                          int contrast,
                          PgColor_t *light,
                          PgColor_t *dark );

Arguments:

flat_color
The base color towards which the computed colors are intended to converge. It's the color in the middle of the gradient.
contrast
The amount of contrast that you want in the gradient, ranging from 0 (low contrast) through 255 (high contrast). The contrast is biased towards the light color.
light
A pointer to the PgColor_t in which to store the lightest color for the gradient.
dark
A pointer to the PgColor_t in which to store the darkest color for the gradient.

Library:

ph

Description:

This function computes light and dark colors that can be used to construct gradients. It's used by Photon to compute bevel gradients.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgBackgroundShadings(), PgColor_t

"Gradients" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide