Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PgGetPalette()
Query for current color palette
Synopsis:
int PgGetPalette( PgColor_t *palette );
Library:
ph
Description:
This function queries the graphics driver for the current palette. A palette is an array of _Pg_MAX_PALETTE RGB (PgColor_t) colors. The palette parameter must be a pointer to a suitably-sized array, which will be filled with the color values representing the current palette.
This function is useful for graphical image utilities such as pv, which can perform improved dithering with knowledge of the graphics palette.
![]() |
You must target this function at a specific card by calling PdSetTargetDevice(). PgGetPalette() blocks until the operation is complete. |
Returns:
- 0
- Successful completion.
- -1
- An error occurred.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PdSetTargetDevice(), PgColor_t
"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)
