For Adobe ColdFusion application servers RGBTriplet

RGBTriplet accepts an RGB colour triplet, that is: an optional hash or pound sign (#) followed by six hexadecimal digits.

One special attribute is available for RGBTriplet:

  • WebSafe
    Optional. Defaults to false. If set to true, the datatype will only accept "Web-safe" colours. A web-safe color must be built from pairs of the following letters and digits: "00, 33, 66, 99, CC, FF". For example, #00ccff or #660099.

Examples

An RGBTriplet field with a default colour (note that the # is escaped as it is inside a string):

<cf_terrafield
  name="Colour1"
  datatype="RGBTriplet"
  default="##1133a0"
/>

This field only accepts Web-safe colours:

<cf_terrafield
  name="Colour2"
  datatype="RGBTriplet"
  websafe="true"
/>

No comments yet