Here's one way:
function getColorPart() {
var n = formatBaseN(randRage(0,255), 16)
if (len(n) EQ 1) {
n = "0" & n;
}
return n;
}
<cfset color = "#getColorPart()##getColorPart()##getColorPart()#" />
That said, you don't want to do that. Really. Use a tool to create a
palette of colors that go well together and have sufficient contrast
to be differentiable, and then use them in order.
cheers,
barneyb
On Fri, Jan 30, 2009 at 10:53 AM, Charles E. Heizer <[email protected]> wrote:
>
> Hello,
> How would I go about generating random colors for my charts?
>
> Thanks,
> -Charles
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318673
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4