Api/dev.colorprint(): Difference between revisions

From Minux Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 13: Line 13:
prints printstring in the color set by textcolor and backgroundcolor, only affects the one print made with this.
prints printstring in the color set by textcolor and backgroundcolor, only affects the one print made with this.


background argument is optional, defaults to black if not provided.
background argument is optional.




eg: dev.colorprint("hello world!","red","blue") prints "hello world" in red text and blue background.
eg: dev.colorprint("hello world!","red","blue") prints "hello world" in red text and blue background.
eg: dev.colorprint("hello world!","yellow") prints "hello world" in yellow text and default background

Latest revision as of 14:33, 1 October 2024

this function is part of the dev. api and used to print a single line in color


usage:

dev.colorprint(printstring, textcolor, backgroundcolor)


output:

prints printstring in the color set by textcolor and backgroundcolor, only affects the one print made with this.

background argument is optional.


eg: dev.colorprint("hello world!","red","blue") prints "hello world" in red text and blue background.

eg: dev.colorprint("hello world!","yellow") prints "hello world" in yellow text and default background