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

Question about term.setPalleteColour()/term.getPalleteColour

Started by Wilma456, 27 June 2017 - 04:17 PM
Wilma456 #1
Posted 27 June 2017 - 06:17 PM
I'M testing the new functions term.setPalleteColour()/term.getPalleteColour(). But what are the arguments? I had thinked it's RGB Coded, but e.g term.setPalleteColour(colors.white,255,0,0) makes the text black and not red. And when I run term.getPalleteColour(colors.blue) I get 0.2,0.4,0.8 Which are almost black in RFB Code. So what mean this numbers?
KingofGamesYami #2
Posted 27 June 2017 - 06:41 PM
RGB mapped to 0-1 instead of 0-255. Yes, that is a weird implementation.
Wilma456 #3
Posted 27 June 2017 - 06:46 PM
How can I move RGB Coded to Codes for term.setPalleteColour()?
Lyqyd #4
Posted 27 June 2017 - 07:43 PM
Divide them by 255.
Wilma456 #5
Posted 27 June 2017 - 08:02 PM
Thank you
Sewbacca #6
Posted 28 June 2017 - 06:22 PM
Recently, CC is gone Open Source and by scanning the posts I read the function term.getColorPallette(). I really don't have any clue, where it come from. Can anybody tell me where I get more information? (Obviously the CC Wiki doesn't ~ looks like a custom CC)
Edited on 28 June 2017 - 04:22 PM
SquidDev #7
Posted 28 June 2017 - 06:41 PM
Recently, CC is gone Open Source and by scanning the posts I read the function term.getColorPallette(). I really don't have any clue, where it come from. Can anybody tell me where I get more information? (Obviously the CC Wiki doesn't ~ looks like a custom CC)
The original forum post about open sourcing CC can be found here. This contains links to Dan's announcement and some posts about the changes which have been made. term.getColorPalette is in "official" CC, but there hasn't been an actual release yet. Sadly there currently isn't much documentation about it (other than CC's help files) as we don't really want to update the wiki until it is officially released.
Bomb Bloke #8
Posted 29 June 2017 - 03:50 AM
Speaking of, I've finally put to paper my thoughts on the implementation, and would like to hear views on some proposed changes / additions to it:

https://github.com/dan200/ComputerCraft/issues/343