Color picker for part

Hey guys! I’m attempting to make a Christmas tree decorator, and an essential part of a decoration game is customizing the colors! I’m having a hard time with this. I’ve found many of these for Surface guis and gui’s, but none were meant for parts. Do you guys know any good modules or ways to do this?

Thank you!

1 Like

You could ask the player to input a BrickColor String, or a BrickColor Number.

function Color(part, color)
part.BrickColor = BrickColor.new(color)
end

-- Later:

local color = 1004 or "Really Red" -- Replace this
local part = script.Parent -- Replace this also
Color(part, color)

That’s a good idea… but most players aren’t familiar with Roblox’s system, unless they are developers.

To Change Part Colors, you do BrickColor or Color3

BrickColor:

Part.BrickColor = BrickColor.new("Insert a String, and Pick a Color Provided")

Color3:

local Red = 15
local Green = 15
local Blue = 15

Part.Color = Color3.fromRGB(Red, Green, Blue)

It works with numbers and the color names

Sorry, I misread what you’re saying! That’s a good idea, but it would be very tiring as Roblox has hundreds of different color, and there is billions of different RGB colors

There are roughly 16 million Colors Combinations you can use with RGB

Combining the BrickColor code with the Color3 code that @DasKairo provided

-- BrickColor:
function Color(part, color)
part.BrickColor = BrickColor.new(color)
end
-- Color3:
function doColor3(Red, Green, Blue, color)
part.Color = Color3.fromRGB(Red, Green, Blue)
end

-- Later call these:

-- BrickColor:
local color = 1004 or "Really Red" -- Replace this
local part = script.Parent -- Replace this also
Color(part, color)
-- Color3:
local part = script.Parent -- Replace this also
doColor3(255, 0, 0, color)

I’m not sure why you are turning it into a function, that’s kind of unnecessary for such simple of a property change

Unless you are providing a table, you dont need that:

local ColorTable = {
Color3.fromRGB(255,0,0); -- Red
Color3.fromRGB(0,255,0); -- Green
Color3.fromRGB(0,0,255); -- Blue

}

Part.Color = ColorTable[math.random(1, #ColorTable)]

2 Likes

See if this works:

Character Limit

Will they touch the parts to color change or use a gui of some type? Anyways, you could have a number of pre-set colors maybe a brick they walk on or from a gui.

I think you should make 3 scroll bars, for red, green and blue (or simply ask the player for them). Then you could add a frame below to display the current inputted color.