How would i do that?
COMMUNITY QUESTION
How do i convert a Color3 value into a BrickColor?
4 answers
What you're looking for is BrickColor.new(Color3.new(0, 0, 0)). As for BrickColor to Color3, BrickColor.new("White").Color.
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
You could use color = BrickColor.new(Color3.new(0,0,0)) or color = Color3.new(0,0,0); brickcolor = BrickColor.new(color)
-- 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
This discussion is preserved as it was. New answers, comments, and votes are closed.
