-
Notifications
You must be signed in to change notification settings - Fork 195
Term
Here are the new added in functions that aren't explained about in the original wiki.
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(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