generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Color3 Tween?

Previous Thread :: Next Thread 
TheGreenDeveloper is not online. TheGreenDeveloper
Joined: 29 Dec 2013
Total Posts: 776
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 is online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image