|
| 09 Oct 2015 07:42 PM |
| I need to know how to get the difference between 2 color3's in the way of lerp. Help? |
|
|
| Report Abuse |
|
Xsitsu
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2921 |
|
|
| 09 Oct 2015 07:53 PM |
You'll have to convert it to HSV, tween that, and then convert back. Here's an HSV tweener I use to just cycle through the rainbow:
http://pastebin.com/rRcNE0BG |
|
|
| Report Abuse |
|
nox7
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 27467 |
|
|
| 09 Oct 2015 07:55 PM |
local function InterpolateColor(C1, C2, Percentage) return Color3.new( C1.r + (C2.r - C1.r) * Percentage, C1.g + (C2.g - C1.g) * Percentage C1.b + (C2.b - C1.b) * Percentage ) end
for i = 0, 1, 0.05 do Part.Color = InterpolateColor( Color3.new(0,0,0), Color3.new(1,1,1), i ) wait() end |
|
|
| Report Abuse |
|