Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How do i convert a Color3 value into a BrickColor?

Asked by 10 years ago

How would i do that?

4 answers

Log in to vote
8
Answered by
nate890 495 Moderation Voter
10 years ago

What you're looking for is BrickColor.new(Color3.new(0, 0, 0)). As for BrickColor to Color3, BrickColor.new("White").Color.

Ad
Log in to vote
0
Answered by 10 years ago

Click here to see the wiki post about this.

local brickcolor = BrickColor.new("Really red") --Create our new BrickColor
local color = brickcolor.Color --BrickColors have a Color property that returns their Color3
Log in to vote
0
Answered by 10 years ago

You could use color = BrickColor.new(Color3.new(0,0,0)) or color = Color3.new(0,0,0); brickcolor = BrickColor.new(color)

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
-- BrickColors RGB goes from 0 to 1, with decimal places 
-- color3 RGB goes from 0 to 255
local function ConvertBrickColorToColor3(brickColor)
    -- sampling rate of color3
    local colorSteps = 255
    local color3 = Color3.fromRGB(brickColor.r * colorSteps, brickColor.g * colorSteps, brickColor.b * colorSteps)
    return color3
end

Answer this question