term.setPaletteColor(color, r, g, b) returns nil
term.setPaletteColor(color, r, g, b)
This function lets you set every color ( for example: colors.red ) to an RGB color (with each component in the interval [0;1])
colors.red
Example
term.setPaletteColor(colors.yellow, 1, 1, 0)
This will set everything that has the color colors.yellow to solid yellow (1, 1, 0)
colors.yellow
term.getPaletteColor(color) returns r, g, b
term.getPaletteColor(color)
This function lets you get the RGB of an color ( for example: colors.red ).
local r, g, b = term.getPaletteColor(colors.yellow) print("Red: " .. r) --# Red: 1 print("Green: " .. g) --# Green: 1 print("Blue: " .. b) --# Blue: 0
This will print out the palette color of colors.yellow.
There was an error while loading. Please reload this page.