Skip to content
Bennamari Ilias edited this page Mar 4, 2018 · 6 revisions

Term

Here are the new added in functions that aren't explained about in the original wiki.

term.setPaletteColor

term.setPaletteColor(color, r, g, b) returns nil

This function lets you set every color ( for example: colors.red ) to a RGB color (limited to 16)

Example term.setPaletteColor(colors.yellow, 16, 16, 0)

This wil set everything that has the color colors.yellow to solid yellow (16, 16, 0)

term.getPaletteColor

term.getPaletteColor(color) returns r, g, b

This function lets you get the RGB of an color ( for example: colors.red ).

Example `local r, g, b = term.getPaletteColor(colors.yellow)

-- I don't really know the color of yellow. -- But i wil guess. print("Red: " .. r) --# Red: 16 print("Green: " .. g) --# Green: 16 print("Blue: " .. b) --# Blue: 0`

This wil print out the (Palette) color of colors.yellow.

I think that these are the only ones added in to the Term API

Clone this wiki locally