Skip to content
Paul edited this page Dec 13, 2015 · 6 revisions

To use colours when printing text to the screen in Q OS, simply have this 0x9F in the end of print() statement. Example:

print("Hi :+1:", 0x9F);

As of Q OS 0.06+, you are now able to just do this when you want to use the default color scheme (0x9F):

print("Hi :+1:", white);

Likewise, you can do the following things to use the respective color:

print("Hi :+1:", black);
print("Hi :+1:", blue);
print("Hi :+1:", green);
print("Hi :+1:", gray);
print("Hi :+1:", red);
print("Hi :+1:", purple);

You can put any of the color names after the message you want to display in "quotes" that is in the list at the bottom of the page.

Everything below here was present as of v0.05-alpha

The colours can be customized as needed. But first, understanding the anatomy of the colour code is important (Need refinements). The part that we are going to look at is the last 2 Hexadecimal digit. The first one will tell the terminal to colour the background (In the example, the background will be black). The second will tell the terminal to colour the text (In the example, white). Here is the colour codes:

Number Colour
0 Black
1 Blue
2 Green
3 Grey
4 Red
5 Purple
6 Brown
7 Light Grey
8 Dark Grey
9 Lighter Blue
A Green
B Cyan
C Bright Red
D Magenta
E Yellow
F White
Clone this wiki locally