Download 3 Overview - Inductive Automation
Transcript
Appendix B. Expression Functions
805
... returns
10.7.3 toColor
toColor(value, [failover])
This function tries to convert value to a color. It assumes that value is a string. If you have integers
representing Red, Green, and Blue values see the color expression. The string value is converted to
a color according to these rules:
1. If value is a name of a color as defined in the table below, the corresponding color will be returned.
Note that color names are case insensitive.
2. If value is a hex color string (with or without a leading "#", the color equivalent of that hex string will
be used. Examples: "#FF0000", "556B2F"
3. If value is a list of 3 or 4 integers, a color will be created that uses the first three integers as red,
green, and blue values, and the optional fourth integer as an alpha channel value. All values should
be between 0 and 255. The list is free-form, any non-digit characters may be used as delimiters
between the digits. Examples: "(0,0,0)", "23-99-203", "[255,255,33,127]"
For example, all of these expressions return the color red:
toColor("red")
toColor("#FF0000")
toColor("255,0,0")
You can use the failover parameter to ensure that this expression returns something even if the
input string may be bad:
toColor({UserOptions/CustomColor}, "black")
Named Colors
AliceBlue
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Clear
Coral
CornflowerBlue
© 2013 Inductive Automation
#F0F8FF
#FAEBD7
#00FFFF
#7FFFD4
#F0FFFF
#F5F5DC
#FFE4C4
#000000
#FFEBCD
#0000FF
#8A2BE2
#A52A2A
#DEB887
#5F9EA0
#7FFF00
#D2691E
(transparent)
#FF7F50
#6495ED
Related documents
TBarCode .NET Developer Manual V11
MES User Manual - Inductive Automation
TAC Vista
ISCE manual and installation, JPL
Crystall Ball Manual
2 Overview - Inductive Automation
3D Viewer - Kansas State University
FactorySQL 4.1 User Manual
SQA Higher Computing Unit 2 Software Development
MES User Manual - Inductive Automation
SE-SW5U(-WT) - AutomationDirect
Color Efex Pro 3.0 User Guide
MES User Manual - Inductive Automation
Oracle Lease and Finance Management User`s Guide
User`s Manual
Contents - Introduction
Presentation Slides
Early Warning System - Application User Guide
Gentlemen Agreements Rules for Cluster Uses
Net Protocol Suite User-Defined Decoding (UDD
SWIG Manual
"user manual"