Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Define a Gradiated Color
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Hello, this is a method which allows you to input a gradient and return a color on a point of the gradient depending on what data you give it. This allows for creating bars that gradualy change color as they deplete.
It supports any number of colors which will be used in the order you supply them. (100% will return the last color)

First off is the code, place this above every other script.

Code


The call is straightforward -

Code:
self.contents.gradiated_color?(colors,width,percentage)


Colors = The colors to be used to create a faux gradient
Width = The width the bar is going to be, is used to determine where to find the color
Percentage = The percentage of how full the bar is, is also used to determine where to find the color
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Change Color of The diferent Status Script MASTERLOKI 0 2,269 07-18-2006, 01:00 PM
Last Post: MASTERLOKI
  Status Color-Movement Derk-Jan 0 2,017 06-30-2005, 01:05 PM
Last Post: Derk-Jan



Users browsing this thread: