BackgroundColor3 'r' value only?

i currently have a script and i want to set a colour in a colour sequence

local gead = Instance.new("UIGradient", Line)

		local colorSequence = ColorSequence.new{
			ColorSequenceKeypoint.new(0, Color3.new(GuiObjectA.BackgroundColor3.R,GuiObjectA.BackgroundColor3.B,GuiObjectA.BackgroundColor3.G)),
			ColorSequenceKeypoint.new(1, Color3.new(GuiObjectB.BackgroundColor3.R,GuiObjectB.BackgroundColor3.B,GuiObjectB.BackgroundColor3.G))
		}

		gead.Color = colorSequence

We can see that i use GuiObjectA and GuiObjectB. When i hit run, i think it’s only showing the ‘r’ out of rgb.

I tried going straight colour3.new(GuiObjectA.BackgroundColour3 but it never worked

1 Like

Why not just do

local colorSequence = ColorSequence.new {
	ColorSequenceKeypoint.new(0, GuiObjectA.BackgroundColor3),
	ColorSequenceKeypoint.new(1, GuiObjectB.BackgroundColor3)
}

That’s because GuiObjectA.BackgroundColor3 is already a Color3.

2 Likes

it still kinda is the r value. Maybe i just cant see correctly

What are the values of the Color3’s in particular?

image
you can see it looks quite different

81, 38, 39 and 81, 67, 32

Have any idea why it’s like this?

Not sure; in my testing I get this result:
image

For the top image, I used:

local colorSequence = ColorSequence.new {
	ColorSequenceKeypoint.new(0, GuiObjectA.BackgroundColor3),
	ColorSequenceKeypoint.new(1, GuiObjectB.BackgroundColor3)
}

and for the bottom image, I used:

local colorSequence = ColorSequence.new(Color3.fromRGB(81, 38, 39), Color3.fromRGB(81, 67, 32))

They both gave the same result.

wehn using the colour 3 it disabled my dragging script so i had to remove it

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.