So im trying to make a item for my game where if the ore is more blue then green and red it accepts it.. BUTTT I have no idea how to get the blue part of rgb. Is there a function to do it? Please let me know.. Thanks! c:
COMMUNITY QUESTION
How to get different colors of rgb?
2 answers
###If you didn't know, RGB stands for Red, Green, Blue.
###So if you wanted a blue colour, you can do this:
Color3.fromRGB(0, 0, 255)
--If you like Color3.new()
Color3.new(0, 0, 1)
I'm not sure if the other answer posted was relevant to your question. Do you mean how to get each individual r,g, and b value from the Color3.new() value? If so, you can literally use the 'r', 'g', and 'b' properties of the object.
Ex:
a = Color3.new(10,20,30)
print(a.r) -- prints 10
print(a.g) -- prints 20
print(a.b) -- prints 30
4 comments
0
wrong
0
Not wrong, it works? @incapaz
0
Uhh do you wanna elaborate on how this is wrong, incapaz? I tried it out on Studio and it works just fine...
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
What I meant is I have the color already setup. How would I get the blue part or the 255? So I have a part that comes towards the furnace and if the blue part of rgb is grater then green and red then it accepts it. Whats here just makes a color it does not get the parts of it.
You could check the b value. Like part.Color.b