Q1231013. Setting color properties in ColdFusion 3.X

The information on this article applies to
Summary
This article describes how to set color properties in Cold Fusion 3.X

Description
ColdFusion 3.X supports ASP components but it DOES NOT support color properties, even though a color is just a long number. Please note that Allaire fixed this problem in ColdFusion 4.0.1 so you will not need the workarounds described below if you update to this version.

To workaround this limitation you will need to use the SendMsg method. This method has the following syntax

Chart.SendMsg(wMsg,wParam,lParam)

To set colors using this method you should use the following parameters:

wMsg:
26 to set the background color (RGBBk property)
27 to set the 2D background color (RGB2DBk property)
28 to set the 3D background color (RG3DBk property)

wParam
This parameter should be set to 0

lParam
This parameter should contain the numerical representation of the color, to get this color you can use the windows calculator to translate a hex number (BBGGRR) into a decimal number.

e.g.

' To set the background color to black
<CFSET Chart1.SendMsg(26,0,0)>

' To set the 2D background color to white
<CFSET Chart1.SendMsg(27,0,16777215)>

' To set the 3D background color to red
<CFSET Chart1.SendMsg(28,0,256)>

Related Articles
Q1233007 UserAgent property
Q1233008 SetArrayProp method
Q1311265 What Colors Can I Use With ChartFX
Q1341197 How to set colors in Chart FX 5.x (COM) Using C#
Q1342130 Series property page: Color not showing in combo
Q1371002 Changing the colors of the markers depending on a condition
Q1381095 Adding annotations in a COM Interop application
Q1392003 Color menus not displaying correctly
Q1432060 SVG images and Point Label Font Colors
Q1432080 Interlacing problem in Internet 6.2
Q1681000 Setting custom colors to the Prices Series
Q6001019 Creating color palettes for ChartFX for .NET
Q6001043 How to change the line color for a selected series while the markers keep the original series color
Q6002027 Color displayed incorrectly in the UI for the Stripe Object
Q6002126 Setting BorderColor for ‘All Series’ using the run-time property dialog is ignored
Q6002193 Alternate color for an interlaced grid is ignored
Q7121027 Conditional Attributes Same Color


ArticleID:Q1231013
Keywords:Cold Fusion; Color;Server; ASP;Server; ASP
Reviewed:6/29/2000 12:15:00 PM

DISCLAIMER INFORMATION:
Information in this document is subject to change without notice and does not represent a commitment on the part of Software FX, Inc. The software, which includes the information contained in any databases, described in this document is furnished under a license agreement or nondisclosure agreement. The software may be used or copied only in accordance with the terms of those agreements. It is against the law to copy the software on any medium except as copy of the software for backup purposes. No part of this article may be reproduced or transmitted in any form or by any means including recording, or information storage and retrieval systems, for any purpose other than the purchaser's personal use, without the express written permission of Software FX, Inc.

Software FX, Inc. disclaim all warranties, either express or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose, with respect to the instructions contained in this article.

In no event shall Software FX, Inc. be liable for any damages whatsoever including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss, even if Software FX, Inc. has been advised of the possibility of such damages. Because some states do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.