MrHistoryJoin Date: 2010-08-30 Post Count: 5291 |
slingshotjunkie said that chat colors depend on our username strings |
|
MettaurSpJoin Date: 2010-03-20 Post Count: 3179 |
Yeah, has to do with the hash if I remember correctly. You can find a thread with Lua code posted that has the same result if you look deep enough. |
|
MrHistoryJoin Date: 2010-08-30 Post Count: 5291 |
I've compiled this list of usernames and colors:
MrHistory cream
bella897 orange
jnajanjanet orange
904lego red
megapachi47 orange
Nyaonix red
Xandalf orange
playfromscratch green
SongofSwords pink
lordmeery yellow
solman123 orange
skyarex purple
Neostic purple
ben10ultimatealien pink
sparky2603415 blue
sparkleish pink
sparklepop23 pink
Toxessa cream
Niightmaremoon yellow
Wraze purple
AngelCross blue
RileyAnastasiya pink
SaltyHippo yellow
jarednotanoob orange
Codmius green
DragonOfTime purple
CafeMiner pink
MrHistoryTestUser1 yellow
TestUserMrHistory2 orange
Gamecube4 purple
CommanderCornbread green
ConnerMEDU green
Undefined98 blue
Undefinite blue
Quenty red
I'll see what patterns I can find. So far, none |
|
|
there's an old thread with a lua function that correctly gets the name color. |
|
MrHistoryJoin Date: 2010-08-30 Post Count: 5291 |
link pl0x? |
|
|
I'll dig around and try to find it |
|
MettaurSpJoin Date: 2010-03-20 Post Count: 3179 |
I have the script in case I ever needed it (with the original scripter for credit). I can pm it to you if you want. |
|
|
_G.ChatColors = {
BrickColor.new("Bright red"),
BrickColor.new("Bright blue"),
BrickColor.new("Earth green"),
BrickColor.new("Bright violet"),
BrickColor.new("Bright orange"),
BrickColor.new("Bright yellow"),
BrickColor.new("Light reddish violet"),
BrickColor.new("Brick yellow")
}
function _G.GetColor(name)
local value = 0
for index = 1,#name do
local cValue = string.byte(string.sub(name,index,index))
local reverseIndex = #name - index + 1
if #name%2 == 1 then
reverseIndex = reverseIndex - 1
end
if reverseIndex%4 >= 2 then
cValue = -cValue
end
value = value + cValue
end
return _G.ChatColors[value%8 + 1]
end |
|
|
I wish we could actually choose the text colours. I think I know why they have done it this way, but I don't really like green. |
|
MrHistoryJoin Date: 2010-08-30 Post Count: 5291 |
Thanks, TigreBlood |
|
|
Np Buddy 'Boy i Am a Help'er |
|
|
Why don't you take the actual code from the actual chat script? You can find it here: github dot com slash RobloxLabs slash internal-code slash blob slash master slash core-scripts slash ChatScript-97188756 dot lua
ChatColors = {
BrickColor.new("Bright red"),
BrickColor.new("Bright blue"),
BrickColor.new("Earth green"),
BrickColor.new("Bright violet"),
BrickColor.new("Bright orange"),
BrickColor.new("Bright yellow"),
BrickColor.new("Light reddish violet"),
BrickColor.new("Brick yellow"),
}
local function GetNameValue(pName)
local value = 0
for index = 1, #pName do
local cValue = string.byte(string.sub(pName, index, index))
local reverseIndex = #pName - index + 1
if #pName%2 == 1 then
reverseIndex = reverseIndex - 1
end
if reverseIndex%4 >= 2 then
cValue = -cValue
end
value = value + cValue
end
return value%8
end
local function ComputeChatColor(pName)
return self.ChatColors[GetNameValue(pName) + 1].Color
end |
|
|
|