This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ds84182's profile picture

Colored Text [Completely New Idea]

Started by ds84182, 14 April 2012 - 10:14 PM
ds84182 #1
Posted 15 April 2012 - 12:14 AM
I was thinking and… What if you could have console colors using a 16-color palette?
It would be simple.
A single letter would have 2 values, foreground and background.
The color would be in one byte.
It sends the color with the text data.
And the colors can be configured in the config.
Also colors can be enabled with a function (term.setColorMode(true/false))

Sample screen packet:
1(0x65) 2(0x10) = A
1: Letter
2: Color; Black Foreground, White Background.

Size of sending a screen regularly: 900b
Size of sending a screen with color: 1800b

Alters the term api.
Adds:
term.setColorMode(bColor)
term.setColor(nFore, nBack)
term.getColorMode()
term.getColor()

EDIT:
Line 3: Also the letter.

Also, on SMP Servers this could be disabled!
Leo Verto #2
Posted 15 April 2012 - 01:26 AM
Hmm, I think this is like half implemented yet, at least it wouldn't be a big deal to implement it.
Cloudy #3
Posted 15 April 2012 - 03:10 AM
The main reason colours aren't in is because they do not fit with the vision of the mod. It would be trivial to implement (the minecraft text renderer does support colour changes) and indeed was accidentally enabled in the first version of CC.
Xtansia #4
Posted 15 April 2012 - 03:18 AM
The main reason colours aren't in is because they do not fit with the vision of the mod. It would be trivial to implement (the minecraft text renderer does support colour changes) and indeed was accidentally enabled in the first version of CC.

But it also broke some functionality of the mod.
Cloudy #5
Posted 15 April 2012 - 04:42 PM
The main reason colours aren't in is because they do not fit with the vision of the mod. It would be trivial to implement (the minecraft text renderer does support colour changes) and indeed was accidentally enabled in the first version of CC.

But it also broke some functionality of the mod.

Yeah - but that is basic stuff that can be worked around by altering the string functions to remove the colour codes when taking into account length. That way the string length and other functions will work as expected. As I said, it would be trivial to implement - Dan just doesn't want to.
djblocksaway #6
Posted 16 April 2012 - 01:42 AM
hmm color would be a great idea but as tomass said it broke some functions of the mod.
and you can change your color of the terminal window in the config

mine is green :)/>/>
Leo Verto #7
Posted 16 April 2012 - 07:04 PM
mine is green :)/>/>
Matrix green, just like my CMD, I'll probably get that too. :)/>/>
djblocksaway #8
Posted 20 April 2012 - 02:33 PM
mine is green :)/>/>
Matrix green, just like my CMD, I'll probably get that too. :)/>/>
aha yeah its awsome :)/>/>
Leo Verto #9
Posted 20 April 2012 - 05:17 PM
mine is green :)/>/>
Matrix green, just like my CMD, I'll probably get that too. :)/>/>
aha yeah its awsome :)/>/>
What's the RGB code for that?
I'm too lazy to find a good green and convert it to RGB myself. :)/>/>
ds84182 #10
Posted 30 April 2012 - 10:12 PM
hmm color would be a great idea but as tomass said it broke some functions of the mod.
and you can change your color of the terminal window in the config

mine is green :)/>/>
I ment to say multiple colors on the screen.
Dirkus7 #11
Posted 03 May 2012 - 11:17 PM
mine is green :)/>/>
Matrix green, just like my CMD, I'll probably get that too. :)/>/>
aha yeah its awsome :D/>/>
What's the RGB code for that?
I'm too lazy to find a good green and convert it to RGB myself. :)/>/>
Ehm red:0 blue:0 green:255
That wasn't that difficult was it?
djblocksaway #12
Posted 05 May 2012 - 04:51 PM
lol you could just google it also…:)/>/>
Leo Verto #13
Posted 05 May 2012 - 10:02 PM
Thanks for the answers, but I think a blue text would look awesome, too.

But not full blue.