| |
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 12 Oct 2013 11:38 AM |
| Explain what you're trying to do? |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 11:42 AM |
| Color a brick using hex code. |
|
|
| Report Abuse |
|
|
Dexinus
|
  |
| Joined: 07 Sep 2011 |
| Total Posts: 103 |
|
|
| 12 Oct 2013 11:47 AM |
No, hex code isnt implemented into Rbx.Lua.
- Dex, Add 2k to my post count |
|
|
| Report Abuse |
|
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 12 Oct 2013 11:53 AM |
color = string.byte("100")
Here's an example:
color = string.byte("100") game.StarterGui.ControlGUI.Reset.BackgroundColor3 = Color3.new(string.char(color)/255, 100/255, 100/255) |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
| |
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 12 Oct 2013 11:59 AM |
195905 "No, hex code isnt implemented into Rbx.Lua." Eh... yes it is. The format is 0x#### So, print(0xFF) would print 255
function GetColor3FromHex(value) -- value is a string, so "195905" return Color3.new( tonumber("0x"..value:sub(1,2))/255, tonumber("0x"..value:sub(3,4))/255, tonumber("0x"..value:sub(5,6))/255 ) end
print(GetColor3FromHex("195905")) --> 0.0980392, 0.34902, 0.0196078
print(GetColor3FromHex("FF00FF")) --> 1, 0, 1 |
|
|
| Report Abuse |
|
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 12 Oct 2013 11:59 AM |
| Nevermind, that's not hex. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 12:22 PM |
195905
Color3.new(25/255, 89/255, 5/255) |
|
|
| Report Abuse |
|
|