NoveltyML value types
This is a list of the various value types in NoveltyML and their syntax.
Angle
Floating point value referring to an angle (in radians).
Angles can also be specified in degrees using the d-suffix.
Example: "3.14" or "180d"
Boolean
True or false.
Example: "true" or "false"
Float
Floating point value.
Example: "1.3"
Color
Color value. (See color formatting)
Example: "Red"
Integer
Integer value.
Example: "4"
String
Plain text or string of characters.
Example: "This is a string"
Vector2
Two-dimensional value, or two floats separated by a comma(,).
Example: "1,1.4"
Vector3
Three-dimensional value, or three floats separated by commas(,).
Example: "1, 2.0, 3.4"
Vector4
Four-dimensional value, or four floats separated by commas(,).
Example: "1, 2.0, 3, 4.0"
Special characters (Strings)
Character | XML |
& | & |
< | < |
> | > |
" | " |
' | ' |
(Unicode) | &#x??; |
Remarks: For unicode characters, replace ?? with the unicode value (hex or integer).
Color value formatting
A color value can be expressed a number of different ways:
-
Three floats (r,g,b)
Three floating point values specifying the red, green and blue components of the color, where zero(0) is the lowest and one(1) is the highest value.
Example: "1, 0.5, 0"
-
Four floats (r,g,b,a)
Four floating point values specifying the red, green, blue and alpha(opacity) components of the color.
Example: "1, 0.5, 0, 0.8"
-
Hexadecimal value (#RRGGBB)
Similarly to html, colors can be specified in this hexadecimal format containing the red, green and blue components of the color.
Example: "#FFCC80"
-
Hexadecimal value (with alpha) (#AARRGGBB)
You can also specify the alpha channel in the hexadecimal format.
Example: "#80FFCC80"
-
Plain english
Novelty recognizes a predefined set of color names.
Example: "Red"