Coloring parts with hex codes?

Mostly in the title. I noticed that the color menu in Studio supports 8-bit HTML codes for coloring parts. Is there some way I can use that feature programmatically (in a script) or is it limited to just studio usage?

image

Thanks for reading.

2 Likes

Short answer: no.

Long answer:
Good question. This isn’t actually Studio’s UI, it’s Windows’s UI. I am on Mac, and the colour selection is different. It’s also what is used in many other apps. HEX is built in to Windows, however it isn’t built in to be supported by Studio. You can see identical UIs to your example on Windows in other programs, such as Paint, which is preinstalled if you want to take a look.

Proof:
Colour picker in Studio vs colour picker in DaVinci Resolve (an external video editing program)
Screen Shot 2020-08-31 at 1.03.56 AMScreen Shot 2020-08-31 at 1.08.09 AM

Sadly, there is not a direct function for covering hex to RBG, and roblox only accepts RBG at ground level.

However, there are ways to convert hex codes into RBG format.
You could use a function something like these:

4 Likes

Although you can program with Color3 data types, you can only work with color formats from RGB and from HSV. (Color3 | Documentation - Roblox Creator Hub)

Here is a post that I found that shows ways to convert HEX Color formats into Color3 formats with code.

You can read about the entire thread here.

1 Like

Many of the Operating Systems themselves come built in with a Color Picking program, in which different programs can call to access these built in Color Pickers for the OS.

Fun fact actually, if you click second tab of the MacOS Color Picker window and switch the type of slider from the Grayscale Slider to the RGB Sliders, you can work with directly with HEX and RGB Color formats.

1 Like

Hex is supported now

you can use Color3.fromHex(Hex value which should be a string)

Incredibly late reply