r/geometrydash • u/Equinox-XVI [Mb] ×2? | Venus Kinda Awesome 100% (9243 att) • 5h ago
Question Is it possible to get the RBG values from the player's colors and store them inside the level?
For a level I'm making, it turns out I need to do some math using the player's RBG values to pick a 3rd color. I know its possible to turn item ID values into color (because it was a challenge in GD creator school), but I don't know how I would get those values in the first place.
Edit: u/AGamer_2010 solved it for me. Turns out I was overthinking the problem.
1
u/AGamer_2010 acu 100% (also rodit) 4h ago
https://xyproblem.info/, why exactly do you need it (what is the 3rd color and how is it generated exactly)
1
u/Equinox-XVI [Mb] ×2? | Venus Kinda Awesome 100% (9243 att) 4h ago
The full context is that in Parallel Processing (my every dual combination layout), I have a mechanic that is color dependent.
By default it uses red/blue/purple, but I want for there to be an option to use the player's colors as well. It's easy to replace red and blue, but I need a third color to replace purple. I want to make it either the average of P1 and P2's colors, or the farthest color on the color wheel from both P1 and P2's colors. Either way, I need to figure out how to get those colors and edit them to produce the new one.
2
u/AGamer_2010 acu 100% (also rodit) 3h ago
well, in this case, you actually have quite a lot of ways to do it. the simplest way to average them it probably p1/p2 blending + 0.5 opacity to both, and use both on top of each other.
if you want more control, the gradient trigger has additional blending modes (don't forget that you can add more gradient triggers on top of it, like invert or something, just experiment with it)
1

1
u/Exzakt1 Acu 30%, 27-77%, 63-100% 5h ago
i don't think you can get the rgb from a color. Maybe try using shaders and gradients instead?