Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PgGray()
Generate the RGB value for a shade of gray
Synopsis:
PgColor_t PgGray( int level );
Arguments:
- level
- The gray level, which ranges from 0 (black) to 255 (white). Intermediate values produce various shades of gray.
Library:
ph
Description:
This macro converts a gray value into a PgColor_t structure. For a complete description of composite color values, see PgSetFillColor().
Returns:
A composite color value.
Examples:
| Color | Gray value |
|---|---|
| Black | PgGray( 0 ); |
| White | PgGray( 255 ); |
| Medium Gray | PgGray( 160 ); |
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PgBlueValue(), PgColor_t, PgCMY(), PgGreenValue(), PgHSV(), PgRedValue(), PgRGB(), PgSetFillColor(), PgSetFillDither()
"Color" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)