Package ilda
Class IldaPalette
java.lang.Object
be.cmbsoft.ilda.IldaPalette
A Palette is a collection of colours. Points in a format 0 or 1 file have an index
referring
to a colour in a palette.
Changing a palette results in changing the colours of a frame.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColour(int r, int g, int b) intgetColour(int index) Colors are stored as 32-bit integers, first eight bits are not used, next eight bits are red, following eight bits are green and last eight bits are bluebyte[]Converts the palette to bytes which can be added in front of an ilda file or stored separatelyvoidConverts this palette to the standard 64 color palette used in most programs
-
Constructor Details
-
IldaPalette
public IldaPalette()
-
-
Method Details
-
addColour
public void addColour(int r, int g, int b) -
getColour
public int getColour(int index) Colors are stored as 32-bit integers, first eight bits are not used, next eight bits are red, following eight bits are green and last eight bits are blue- Parameters:
index- number referring to the palette- Returns:
- the color in the aforementioned format
-
paletteToBytes
public byte[] paletteToBytes()Converts the palette to bytes which can be added in front of an ilda file or stored separately- Returns:
- array of bytes with ilda-compliant palette
-
setDefaultPalette
public void setDefaultPalette()Converts this palette to the standard 64 color palette used in most programs
-