Color Reference: Difference between revisions
>BlueTaslem New page: When defining colors in Roblox, you use <pre> BrickColor.new( <value> ) </pre> The value may be a number, OR the name of a color: <pre> BrickColor.new(21) </pre> and <pre> BrickColor.new... |
>BlueTaslem No edit summary |
||
Line 77: | Line 77: | ||
Please note that this list does not include 'Medium stone grey', as this is the default color for invalid numbers/names (BrickColor.new(-50), BrickColor.new("Not a color name") both return Medium stone grey.) | Please note that this list does not include 'Medium stone grey', as this is the default color for invalid numbers/names (BrickColor.new(-50), BrickColor.new("Not a color name") both return Medium stone grey.) | ||
<br/> | <br/> | ||
A list of all of the colors can be found [[BrickColor_Codes|here]].<br/> | |||
If you would like a more complete reference, you can use the following code: | If you would like a more complete reference, you can use the following code: | ||
<pre> | <pre> |
Revision as of 22:07, 31 December 2010
When defining colors in Roblox, you use
BrickColor.new( <value> )
The value may be a number, OR the name of a color:
BrickColor.new(21)
and
BrickColor.new("Bright red")
both return the color 'Bright red'. (Remember that capitalization must be exact when giving the name of a color!)
Because you can use the names of colors, and the number values corresponding to a color are random at the most, it isn't a very good practice to use the numbers.
However, if you want to, you can use the following color reference:
Color | Value |
---|---|
White | 1 |
Grey | 2 |
Light yellow | 3 |
Brick yellow | 5 |
Light green (Mint) | 6 |
Light reddish violet | 9 |
Pastel Blue | 11 |
Light orange brown | 12 |
Nougat | 18 |
Bright red | 21 |
Med. reddish violet | 22 |
Bright blue | 23 |
Bright yellow | 24 |
Earth orange | 25 |
Black | 26 |
Dark grey | 27 |
Dark green | 28 |
Medium green | 29 |
Please note that this list does not include 'Medium stone grey', as this is the default color for invalid numbers/names (BrickColor.new(-50), BrickColor.new("Not a color name") both return Medium stone grey.)
A list of all of the colors can be found here.
If you would like a more complete reference, you can use the following code:
i = 0 while i < 3000 do i = i + 1 if tostring(BrickColor.new(i)) ~= "Medium stone grey" then print(tostring(BrickColor.new(i)) , i ) end end