Api/dev.colorset(): Difference between revisions

From Minux Wiki
Jump to navigation Jump to search
(Created page with "this function is part of the dev. api and used to set colors for the terminal. '''usage:''' dev.colorset(textcolor, backgroundcolor) '''output:''' sets the text and background color for all following prints or writes. color options come from the colors. api.")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
this function is part of the [[Api/dev|dev. api]] and used to set colors for the terminal.
this function is part of the [[Api/dev|dev. api]] and used to set colors for the terminal.
unlike write or print it does not revert the colors back to what they were.




Line 14: Line 17:


color options come from the colors. api.
color options come from the colors. api.
background is optional
'''examples:'''
dev.colorset("red","green") sets the text to red and background to green.
dev.colorset("yellow") sets the text colour to yellow.

Latest revision as of 14:37, 1 October 2024

this function is part of the dev. api and used to set colors for the terminal.

unlike write or print it does not revert the colors back to what they were.



usage:

dev.colorset(textcolor, backgroundcolor)


output:

sets the text and background color for all following prints or writes.

color options come from the colors. api.

background is optional


examples:

dev.colorset("red","green") sets the text to red and background to green.

dev.colorset("yellow") sets the text colour to yellow.