Changing value of a Color3 texture

How can I change the value of a texture with Color3 on it?

local t = Instance.new("Texture")
t.Color3.--[[Value]] = 230

I mean value as in brightness, of course.

Everything else I tried didn’t work, and I couldn’t find any other topics related to this issue…

--texture=script.Parent:WaitForChild("Decal")
texture=script.Parent:WaitForChild("Texture")

local brightness = 130 / 255
texture.Color3 = Color3.new(brightness, brightness, brightness)
--texture.Color3 = Color3.new(255, 100, 100) - a red tint

--texture.Color3 = Color3.new(100, 100, 100) - could just put the numbers.
--each number is the intensity of that color ... R,G,B.

Crazy part of this is you can actually state a number over 255.
Like with that red tint, it could be 300,255,255 yielding a better version of a red tint.

1 Like

To change the brightness of a colour, you can use the built in Color3.fromHSV.

https://create.roblox.com/docs/reference/engine/datatypes/Color3#fromHSV

-- The colour we start with
local Colour = Color3.fromRGB(21, 134, 255)

-- Converting to HSV (hue, saturation and value)
local H, S, V = Colour:ToHSV()

-- Changing the value (brightness) of the colour
-- The range is 0-1, in this case, it's half the brightness
local NewColour = Color3.fromHSV(H, S, 0.5)

I hope this helps!

1 Like

Thanks to both of you @story246 and @2112Jay !

I sorta combined both of your methods and now my terrain doesn’t look so flat! :smiley:

1 Like

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