generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Getting all colours

Previous Thread :: Next Thread 
vacha is not online. vacha
Joined: 06 Jan 2011
Total Posts: 1993
28 May 2015 10:03 PM
Is there any way to get all the available brick color values from a script?


while true do the do
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
28 May 2015 10:03 PM
hi

dunno
Report Abuse
jewelycat is not online. jewelycat
Joined: 10 Sep 2008
Total Posts: 17345
28 May 2015 10:15 PM
I feel like there should be a better way, but this technically works:
bc = {BrickColor.new("Medium stone grey")}
for i=1,1032 do
local c = BrickColor.new(i)
if (c ~= bc[1]) then
bc[#bc+1] =c
end
end

for i=1,#bc do
print(bc[i])
end
print(#bc) --> 144 colors
Report Abuse
vacha is not online. vacha
Joined: 06 Jan 2011
Total Posts: 1993
28 May 2015 10:17 PM
Nice!!
Thanks!!


while true do the do
Report Abuse
jewelycat is not online. jewelycat
Joined: 10 Sep 2008
Total Posts: 17345
28 May 2015 10:17 PM
Also, if you're interested:

http://wiki.roblox.com/index.php?title=BrickColor_Codes
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
28 May 2015 10:18 PM
BrickColor.palette to be efficient.
Report Abuse
RegularTetragon is not online. RegularTetragon
Joined: 10 Oct 2009
Total Posts: 3085
28 May 2015 11:23 PM
256^3
Color3.new (r,g,b) where r,g,b are integers [0,256) has 256^3 permutations.

in hexadecimal the range goes from 0x0 to 0xFFFFFF, so there are FFFFFF base 16 colors
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
28 May 2015 11:25 PM
Yeah let's just be inefficient and let Roblox 'convert' it to the nearest BrickColor
Report Abuse
RegularTetragon is not online. RegularTetragon
Joined: 10 Oct 2009
Total Posts: 3085
28 May 2015 11:36 PM
part=Instance.new ("Part")
part.Anchored=true
part.Parent=game.Workspace
part.CFrame=CFrame.new (0,2,0)


step=1 --the speed of color change
while true do
for b=0,255,step do
for g=0,255,step do
for r=0,255,step do
part.Color=Color3.new(r,g,b)
wait ()
end
end
end
print ("A color cycle has finished. Repeating")
wait (1)
end

--This script will display every possible color value. It might take awhile.
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
28 May 2015 11:49 PM
local colors={}
for r=1,255 do
for g=1,255 do
for b=1,255 do
table.insert(colors,Color3.new(r,g,b))
end
end
end
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
28 May 2015 11:52 PM
Why are you guys even bothering, the question has already been answered giving the appropriate solution.
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
28 May 2015 11:53 PM
naw that won't work

because

once the r loop is done, it'll start adding to the g loop, so it will be 255,g,b

so not all of the Color3

like this

local Color3s = {r={},g={},b={}}

coroutine.wrap(function()
for i = 0,255 do
wait()
table.insert(Color3s.r,i,i)
end
end)
coroutine.wrap(function()
for i = 0,255 do
wait()
table.insert(Color3s.g,i,i)
end
end)
coroutine.wrap(function()
for i = 0,255 do
wait()
table.insert(Color3s.b,i,i)
end
end)

but this is really ineffecient
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image