chpal -- Palette changer for ComputerCraft...
CrazedProgrammer 06 Jul 2017
chpal is a cool program that lets you load and export palettes with the new features of ComputerCraft 1.8.
Download
Usage
Palette format
The palette format chpal uses is a limited version of the .Xresources format.
An example palette entry is
The only criterium for an entry is
Example palettes
You can find examples here.
pacpal
Edited by CrazedProgrammer, 06 July 2017 - 11:53 PM.
Download
pastebin get 1XBzKKrT chpal
Usage
chpal <path>Change palette to the palette in path.
chpal --export <path>Exports the current palette to path.
chpal --resetResets the palette to the default ComputerCraft palette.
Palette format
The palette format chpal uses is a limited version of the .Xresources format.
An example palette entry is
*.color0: #000000
The only criterium for an entry is
*.color<n>: #<hex>
Example palettes
You can find examples here.
pacpal
pastebin get xk8pjsJY pacpalpacpal shows an image with all the colours, so you can get a quick look of all the colours.
Edited by CrazedProgrammer, 06 July 2017 - 11:53 PM.
Lignum 09 Jul 2017
I'm surprised this isn't getting much attention, it's a simple but useful tool, and those examples are pretty nifty, as well! Cheers for making this.
CrazedProgrammer 09 Jul 2017
MineRobber___T 15 Jul 2017
Regarding lines 39-45:
I've submitted a PR to ComputerCraft so that that could be simplified to:
PR here (https://github.com/d...rCraft/pull/378)
Quote
-- oh god why local imgpath = "/tmpimg"..math.random(1, 9999) local handle = fs.open(imgpath, "w") handle.write(imgstr) handle.close() local img = paintutils.loadImage(imgpath) fs.delete(imgpath)
I've submitted a PR to ComputerCraft so that that could be simplified to:
local img = paintutils.loadImage(imgstr,true)
PR here (https://github.com/d...rCraft/pull/378)
CrazedProgrammer 15 Jul 2017
MineRobber___T, on 15 July 2017 - 09:49 PM, said:
Regarding lines 39-45:
I've submitted a PR to ComputerCraft so that that could be simplified to:
PR here (https://github.com/d...rCraft/pull/378)
Quote
-- oh god why local imgpath = "/tmpimg"..math.random(1, 9999) local handle = fs.open(imgpath, "w") handle.write(imgstr) handle.close() local img = paintutils.loadImage(imgpath) fs.delete(imgpath)
I've submitted a PR to ComputerCraft so that that could be simplified to:
local img = paintutils.loadImage(imgstr,true)
PR here (https://github.com/d...rCraft/pull/378)