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

Hex Color Values

Started by LuaEclipser, 01 April 2013 - 05:29 AM
LuaEclipser #1
Posted 01 April 2013 - 07:29 AM
Basicly, We should be able to use HEX color values to make more custom things. like we could use

term.setBackgroundColor(#cc0000)
i know that in LUA, # gets the length of something, do maybe a special operator for HEX? like this

term.setBackgroundColor("hex", cc0000)
thats just my idea if how it would work. what do you think?
LuaEclipser #2
Posted 01 April 2013 - 07:42 AM
maybe a good idea would be you must load the colors you want?

colors.hexLoad(#CC000, #Adadad, #hex2455)
then use them

term.setBackgroundColor(hexDraw(CC000))
to prevent lag on how much colors it is using, it will just use the ones you load in
Tiin57 #3
Posted 01 April 2013 - 07:56 AM
Or do it yourself.
LuaEclipser #4
Posted 01 April 2013 - 07:57 AM
dont know Java, only java script :(/>
Cranium #5
Posted 01 April 2013 - 08:08 AM
Not happening.
It's been suggested before that we include hex colors, or a custom color palette. It was always denied because it is simpler, and more fitting within minecraft because there are only 16 'colors/dyes' in vanilla minecraft. This way, it is not overly complicated for anyone else, and that it minimizes issues down the road.
If you want more colors, use CCLights. I believe it uses more than enough for you to enjoy.
Tiin57 #6
Posted 01 April 2013 - 08:57 AM
dont know Java, only java script :(/>
You can add the current colors (as defined in colors.*) as hex in Lua.
MysticT #7
Posted 01 April 2013 - 09:42 AM
Well, you can use hex values like this:

local hex = 0x123FD
But you can't use multiple colors at the same time on the terminal, and that's not gonna change.
Lyqyd #8
Posted 01 April 2013 - 08:43 PM
No.

Previously rejected suggestion; locked.