Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

This might help - read it with the example given by Nesbox and refer to the Wiki :D

local red=0
local green=0
local blue=0
--r,g,b values are in range 0-255
--three consecutive addresses for
--each palette entry
--modify palette index 1
--by poking max rgb values into
--its 3 addresses, making it white 
poke(0x3FC3, 255)
poke(0x3FC4, 255)
poke(0x3FC5, 255)
function TIC()
 --palette index 0 is black by default
 cls(0)
 --hold button A (ie key 'Z')
 --to increase red component of index 0
 if btn(4) then
  if red<255 then red=red+1 end
  poke(0x3FC0, red)
  poke(0x3FC1, green)
  poke(0x3FC2, blue)
 end
 print('This text drawn using index 1',0,16,1)
end