Skip to content

Commit

Permalink
[graphx] fix doc typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga authored Oct 7, 2024
1 parent 0f79767 commit 897e5e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/libraries/graphx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Overview
The graphx library places the LCD in a "palettized" mode - pixels on the screen are actually indexes into an array of colors rather than the color iself.
What this means is that graphx is only functionally capable of displaying up to 256 colors on-screen at one time.
This array of colors is called a "palette", and is accessed using the :code:`gfx_palette` macro variable: e.g. the code :code:`gfx_palette[16]` accesses the 17th color in the palette, and can be directly read or written with a color value.
Palette colors are stored in 1555 format (a version of 565 format), and the macro :code:`gfx_RGBTo1555` can be used to convert a normal 24-bit RGB value into a palette color, for example `gfx_palette[0] = gfx_RGBTo1555(10, 11, 12);`.
Palette colors are stored in 1555 format (a version of 565 format), and the macro :code:`gfx_RGBTo1555` may be used to convert a normal 24-bit RGB value into a palette color, for example :code:`gfx_palette[0] = gfx_RGBTo1555(10, 21, 32)`.
The function :code:`gfx_SetPalette` can set multiple color entries at once, which may be useful when configuring an entire custom color palette.

A better option when working with graphx is to utilize the `convimg <https://github.com/mateoconlechuga/convimg>`_ tool which is supplied with the toolchain.
Expand Down

0 comments on commit 897e5e9

Please sign in to comment.