How to make a color slightly lighter

Made a “custom sword” making thing, and you can choose the color/ore of the blade. But I have no idea how to make the edge slightly lighter than the middle of the blade. How? BTW I used brick color to set the color of the middle, and the edge and the middle are two separate parts, if that wasn’t obvious lol.

When working with colors, you may benefit from using different color encodings, depending on your use-case.

In this case, since you need to adjust the brightness of your color, you could make use of HSV (Hue, Saturation, Value).

You can make use of the Color3 class’ ToHSV method, to convert whatever color you already have, to HSV. Then simply increase V (Value) slightly, to make it a bit brighter.

Here’s an example:

local Part1 = workspace.Part --The part that has the original color
local Part2 = workspace.Part2 --The part that should be slightly brighter

local H,S,V = Part.Color:ToHSV()
Part2.Color = Color3.fromHSV(H,S,V+10) --You can change the 10 to adjust how much brighter the new color should be.

Hope this helps!

4 Likes

nooooooo you beat me to it :rage:

this is a pretty helpful solution for the op’s problem

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