Easy 1D Color Picker

Any possible way? yes
Will I do it for you? i’m busy atm, so probably no

That’s fine lol

I’ve already tried many times, can’t figure a way.

Is it possible to add this GUI to tool or key bind for change the lightsaber outer blade and inner blade colors?

how do i get the color3 that the user has choosen

The easiest way would be to get the BackgroundColor3 of the ColorShower frame.

Is it possible to make it worked with lightsaber blade?

You could. Just make it get the background color of the slider. Then make it change the lightsaber’s color to whatever the background color of the slider is. Every time it changes using the .Changed event.

1 Like

This! Anyone have any tips to reverse-engineer the color slider so that we can set the RGB values and the sliders will adjust accordingly?

Ehhh there’s probably a more efficient way to do this, but here’s a way to do what you want:

color picker set color method.rbxm (6.3 KB)

Something to note is that the slider doesn’t contain any colors that
a. you haven’t added
or b. aren’t obtainable by tweening between the colors you’ve added

So you have to ask yourself:
What if you had a color picker like this, and you tried to set the color red?
image

The answer is that you can’t.
The method I’ve included in this post works by cutting the color bar into 510 sections and selecting the section that is closest to the color you’ve asked for. If the color you’re trying to set doesn’t exist on the bar, it’ll select whatever’s closest in terms of RGB. Also, the set color won’t be precise. It might be off by a marginal percent.

(It might not be a good idea to spam the setToClosestColor function, but computers are reasonably fast at things like this, so you should be fine.)

TLDR:

  • If the color doesn’t exist on the bar, it’ll set it to the closest thing
  • The set color will likely be marginally off, but players shouldn’t notice a difference
  • It’s not recommended to spam the setToClosestColor function
  • There might be a more mathematical/efficient way to do this, but this should be fine
1 Like

sorry. im pretty late to this. where does this go inside of the script?

That piece of code can go anywhere where “Color” is a Color3 variable. I linked a reference to the wiki if you want to read more.

Many of the images in your original post are missing.

The same thing happened here. I wonder if this is a pattern where old posts’ images get removed sometimes?

2 Likes

alright, thank you, ill look through the link as well.

I was looking for a good color picker and I liked this one, so I took the time to redo the UI and clean up the various scripts into one. This is based on Stonetr03’s version above, with the two previews combined and a HEX input added.

2024 EDIT
I found the picker I made two years ago to be not that good, so I pretty much rewrote the whole thing. The bars are now tied to HSV, has plugin support, and more.
Get it here: https://create.roblox.com/store/asset/16814119483/Barbased-color-picker-V2

3 Likes

Cool!
I wish I could mark this as the most recent solution, but it seems you can’t change the solution after a certain time has passed. I’ll link it in the OP.

1 Like

Hello!
I’ve been looking for color pickers and found this one, used it on multiple occasions and was surprised every time by how easy (hence the name Easy 1D Color Picker) it was to use and understand. Thank you so much for making this!

I was absolutely inspired by this and decided to modify it (I modified @Stonetr03’s take on the color picker, you should absolutely check his version as well!).
I added a few additional features to what Stonetr03 has already contributed including:

  • Axis support (Horizontal and Vertical)
  • Added customizability to the RGB Gui, including whether should run on FocusLost (Enter/mouse click away), or on text changes. Also added the ability to change only one color aspect (Red/Green/Blue) of the current ColorShower at a timer, or using all RGB inputs.

Demonstration:

(I like to have the picker of the large color picker transparent, giving the illusion it is 2D, feel free to change that).

Here’s the model if anyone else needs it: Color Picker - Roblox

6 Likes

This thing saved me from having to write a table with all the names of the hair colors variants for the races in my game

THANKS FOR REAL I love you :heart::heart::heart:
You gived me like 500 hours extra of free time

1 Like

This saved hours of trying to figure out how on earth a 1D colour picker works. But thanks to this semi-hacky solution, it works great!

1 Like

Hey @LightingLion58! I modified your modification of the plugin to modularize the code and add plugin support, I improved the GUI and added HSV and Hexadecimal conversions, I also exposed the functions of the color picker in a simple API which allows anyone to call them and implement the color picker in their own projects.

My version can be found both on GitHub and Roblox.

2 Likes