femto.palette - felipemanga/FemtoIDE GitHub Wiki
Summary
Certain screen modes require palettes, or lists of colors, to work.
You can import Jasc .pal
files for this: they will become classes with a .palette()
method meant to be used like this:
screen = new HiRes16Color( MyColors.palette(), font );
For a preview of what a palette looks like, have a look here.
Use custom Palettes in project
Put a .pal file in your project. JASC Palette file format it's a plain text file:
The first line of data contains the text 'JASC-PAL', leave it this way.
The second line contains the text '0100', don't know what this means, just leave it like this.
The third line contains the text '16'. This is the number of colors in the palette.
After that, there are as much lines of text as the numbers of colors, containing 3 numbers per line, with spaces between them.
These numbers are respectively the Red, Green and Blue values (the so-called RGB palette). For example, the color white would be '255 255 255' and black '0 0 0' (255 is the most bright, 0 the less bright)
N.B. First color of the palette will be consider the transparent one, when converting images.
In you code remember to import you palette like this:
import NameOfYourPaletteFile;
and then init the screen mode like:
screen = new HiRes16Color(NameOfYourPaletteFile.palette(), TIC80.font());
Built-in Palettes
The following palettes are inside the femto.palettes
package.
- A64
- Aap16
- AndrewKensler16
- Arne16
- Arq16
- Bubblegum16
- Castpixel16
- CdBac
- Cgarne
- Chip16
- Chromatic16
- Cm16
- Colodore
- ColorGraphicsAdapter
- Commodore64
- CommodoreVic20
- CopperTech
- Crimso11
- Cthulhu16
- Dawnbringer16
- Dinoknight16
- Drazile16
- EasterIsland
- Endesga16
- EndesgaSoft16
- Enos16
- ErogeCopper
- Europa16
- Fantasy16
- Flyguy16
- Froste16
- Fun16
- FztEthereal16
- GrungeShift
- IslandJoy16
- JmpJapaneseMachinePalette
- Jw64
- MacintoshIi
- Master16
- MicrosoftWindows
- Na16
- Naji16
- Night16
- Optimum
- Pavanz16
- PeachyPop16
- Pico8
- Psygnosia
- RiscOs
- RPlace
- Simplejpc16
- SteamLords
- Super1716
- Sweetie16
- Taffy16
- ThomsonM05
- Thug16
- UltimaViAtariSt
- UltimaViSharpX68000
- Zxarne52