Thursday, August 5, 2010

Create ambient color

There are times when you have to display charts with statistical data such as year to date sales, quarter sales, etc.
That's fine until your chart data changes every X period of time, let's say each 5 minutes, in this case the customer needs to somehow know that from last time he saw the statistical information has changed(or refreshed), you can do this by changing the background color of the chart, does not really matter if you choose to make the background gradient(it will look better tho) or not.
Changing the background color will make the user know the data has been changed(refreshed) without him having to think about it(the power of mind...).
We create a array of web colors because most users surf the web daily and they are very familiar with this colors...

Add Graphics and Math to uses clause, add Randomize to initialization section, copy-paste the following code: