Download Demo/Graphics/Palette.txt from hschumann2/TempleOS-Source-Code: direct link, hf CLI and curl.
- Browser
- Download file 532 Bytes
-
https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/Graphics/Palette.txt
- Command line
-
hf download hf://datasets/hschumann2/TempleOS-Source-Code/Demo/Graphics/Palette.txt
-
curl -L -o Palette.txt https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/Graphics/Palette.txt
532 Bytes
| U0 PaletteDemo() | |
| { | |
| I64 i,j; | |
| CBGR48 bgr; | |
| for (i=0;i<COLORS_NUM;i++) | |
| "$BLACK$$BG,%d$__%-8Z__$FG$$BG$\n",i,i,"ST_COLORS"; | |
| SettingsPush; //See SettingsPush | |
| //Alternatively, use GrPaletteSet(gr_palette_gray); | |
| for (i=0;i<COLORS_NUM;i++) { | |
| j=0xFFFF*i/(COLORS_NUM-1); | |
| bgr.b=j; | |
| bgr.g=j; | |
| bgr.r=j; | |
| GrPaletteColorSet(i,bgr); | |
| } | |
| PressAKey; | |
| //You can do it this way, too. | |
| GrPaletteColorSet(WHITE,0xFFFFFFFF0000); | |
| PressAKey; | |
| //SettingsPop() restores original palette | |
| SettingsPop; | |
| } | |
| PaletteDemo; | |