Skip to content

Commit

Permalink
Merge pull request MicrosoftDocs#1324 from hussien89aa/docs
Browse files Browse the repository at this point in the history
The palette should be deleted when it is no longer needed
  • Loading branch information
stevewhims authored Oct 12, 2022
2 parents 7624798 + 5347c71 commit 2b3249b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk-api-src/content/winddi/nf-winddi-engcreatepalette.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ The return value is a handle to the new palette if the function is successful. O

The driver can associate the new palette with a device by returning a pointer to the palette in the <a href="/windows/desktop/api/winddi/ns-winddi-devinfo">DEVINFO</a> structure.

A PAL_INDEXED palette associated with the device must have its first index entry set to black (red = 0, green = 0, blue = 0) and its last entry set to white (255, 255, 255). All other entries should be set so that entries whose indexes are one's complements of each other have colors that contrast greatly. For example, if entry 0x9 of a 16 entry palette is set to pure green (0,255,0), entry 0x6 (=~0x9) should be set to a color that contrasts well with green, such as dark purple (128,0,128). Setting entries in this way allows XOR raster operations to behave reasonably.
A PAL_INDEXED palette associated with the device must have its first index entry set to black (red = 0, green = 0, blue = 0) and its last entry set to white (255, 255, 255). All other entries should be set so that entries whose indexes are one's complements of each other have colors that contrast greatly. For example, if entry 0x9 of a 16 entry palette is set to pure green (0,255,0), entry 0x6 (=~0x9) should be set to a color that contrasts well with green, such as dark purple (128,0,128). Setting entries in this way allows XOR raster operations to behave reasonably. You should delete the palette when you no longer need it by using <a href="/windows/win32/api/winddi/nf-winddi-engdeletepalette">EngDeletePalette</a>.

## -see-also

Expand All @@ -155,4 +155,4 @@ A PAL_INDEXED palette associated with the device must have its first index entry



<a href="/windows/desktop/api/winddi/nf-winddi-engdeletepalette">EngDeletePalette</a>
<a href="/windows/win32/api/winddi/nf-winddi-engdeletepalette">EngDeletePalette</a>

0 comments on commit 2b3249b

Please sign in to comment.