[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Suggestion: Addition to AFL for color usage



PureBytes Links

Trading Reference Links

How would you handle Hue/Saturation/Luminescence?

Bob

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On Behalf
Of scourt2000
Sent: Saturday, October 29, 2005 3:04 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Suggestion: Addition to AFL for color usage


Introduction
------------

I would like to formally submit this addition to the AFL (Amibroker
Formula Language) relating to colors but would first like to gauge
it's usefulness among those who read this list.

Currently, the way to choose colors in AFL is either through a
series of predefined color definitions of the form:

<hardcoded keyword "color"><name of color>

For example, colorRed, colorBlue, colorGreeen, colorBrightGreen, etc.

For custom colors, one has to go to the color preferences dialog,
define a custom color in the bottom section of the color panel and
then use this form:

<hardcoded keyword "colorCustom"><a number starting at 1>

For example, colorCustom1, colorCustom2, etc. where the principal
way you know what color you're using is to look it up in the table
visually and this will vary per Amibroker user depending upon how
they define that special color table section (i.e., it's not
portable across Amibroker users).

Suggested Addition to AFL:

Allow colors to be expressed in AFL like this:

colorRGB(R,G,B)

where R represents 256 shades of Red and ranges in value from 0-255
      G represents 256 shades of Green and ranges in value from 0-255
      B represents 256 shades of Blue and ranges in value from 0-255

Examples:

colorRGB(255, 0, 0)   // red
colorRGB(0, 255, 0)   // green
colorRGB(0, 0, 255)   // blue
colorRGB(128, 0, 0)   // a half-tone red
colorRGB(90, 122, 99  // a dark olive tone

Addition to the ParmColor() function:

Assume that you have this somewhere in your AFL script

    ParamColor("My Color", colorRGB(90, 122, 99))

Now, in a chart, when you press Ctrl-R to bring up the parameters
list and then select "My Color" in order to change the color, you
will get the same Custom Color palette editor to the side of the
normal one you see now (when changing a color through ParmColor())
that would allow you to alter the R, G and B values either manually
or with the black arrow that allows you to change the shading of the
primary red, green or blue.

If that description didn't sound quite clear, I meant to say you
will get the same dialog box as the one you see when you select
Preferences->Colors->Palette Editor in the current version of
Amibroker.

Notes:

What I like about this addition is that it doesn't break any AFL
code already in existence yet gives the users a finer grain of
control over the colors they want to use PLUS the RGB values work
for everyone's computer whereas the use of colorCustom1,
colorCustom2, etc. is not transportable across different users'
Amibroker color usage (custom Color assignments can and will vary
among Amibroker users.

What do you think?

Thanks,

Steve






Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html


Yahoo! Groups Links








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/