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

OpenPeripheral Terminal Glasses Colors

Started by houseofkraft, 31 March 2017 - 06:22 PM
houseofkraft #1
Posted 31 March 2017 - 08:22 PM
Hello!

I am currently trying to make VR with Terminal Glasses and the colors are messed up.

If I try to do 0x80 (gray) the wrong color appears (blue)! I do 0x777777 and gray appears but the problem is if i want 0xAAAAAA (green) it wont work because it's a letter.

please help

thanks
FuzzyLitchi #2
Posted 31 March 2017 - 08:38 PM
<snip>
Edited on 31 March 2017 - 08:38 PM
blunty666 #3
Posted 31 March 2017 - 08:54 PM
The colour needs to be a full hex triplet to work properly, by putting 0x80 you are only setting the last byte of the triplet which is the blue byte, hence the blue colour. Try 0x808080 to get grey.

Can't be sure without loading up an instance, but it might be that the letters need to be lower case (though I would expect upper case to work). That being said 0xaaaaaa would be grey, to get green you need to set the middle byte of the hex triplet, so 0x00ff00 would give you solid green.

Hope that makes sense!
Bomb Bloke #4
Posted 01 April 2017 - 10:46 AM
… it wont work because it's a letter.

0xAAAAAA is indeed a number. If you think it's causing problems, then show us your code, and show us your error.
Edited on 01 April 2017 - 08:48 AM