Applies an explicit border color to any border around a presentation tag.
<box border=3 borderColor={orange},0.5 {Soft edge}> —Draws a thick, half see-through orange border.
If a tag has no border, this field has no effect. A border may be added to a presentation tag using the border field
If the border color is not specified, the tag's foreground color is used; this may be inherited from a parent tag.
This field accepts a color value expressed either as a text keyword or a numerical color value represented in hexadecimal notation.
The color may be followed by an alpha, which makes it see-through (see below).
A value of null may be used to represent the absence of a specified color. This is useful for resetting a tag to its default appearance, or for constructing a tag with a color field without specifying an initial color.
Examples of valid colors in text notation are {black}, {white}, {blue}, {yellow}, and {orange}. ioL accepts any of the color names defined by the SVG 1.1 standard specification, plus {transparent}, which is always invisible. Names can be written in any mix of upper and lower case, so {Navy} and {navy} are the same color.
You can specify any color in the full 24-bit color spectrum by specifying the color's numerical value directly. Color values are 6-digit hexadecimal values, where each pair of digits ranges from x00 to xFF and refers to the color's red, green and blue component respectively.
Examples:
x000000: full black (zero red, zero green, zero blue)xFFFFFF: full white (full red, full green, full blue)xFF0000: pure red (full red, zero green, zero blue)x00FF00: pure green (zero red, full green, zero blue)x0000FF: pure blue (zero red, zero green, full blue)6-digit Hexadecimal numbers are often used to represent color values—on the web and elsewhere—because the codes match up neatly with the 24-bit color encoding used by most computers today.
Unlike regular "base 10" numbers that only use ten different symbols (from 0-9) to represent numbers, hexadecimal numbers use the symbols
A-F as well, to allow 16 possible values per digit.
In ioL, a hexadecimal number begins with a lowercase x and then uses the digits 0-9 and A-F to represent a number.
Hexadecimal digits A-F must be UPPERCASE or ioL won't recognise the value as a number. For example, xB2 is a valid number but xb2 would be treated by ioL as an identifier.
Sample color palettes available online often provide colours in hexadecimal notation. However, please note that ioL requires hexadecimal digits to be written in UPPERCASE with a x (not #) prefix. While the web notation is slightly different, the values themselves are the same. See the table below for examples on how to convert web colors into ioL colors.
| Web color notation | Equivalent ioL notation | |
|---|---|---|
| #94c2bf | → | x94C2BF |
| #ffffff | → | xFFFFFF |
| #93a1a1 | → | x93A1A1 |
Remember that these are numbers, not text. Do not use braces { } around hexadecimal values.
A color can be followed by a comma and an alpha: a number from 0 (invisible) to 1 (solid) that says how much of the color to draw over whatever is behind it. Without an alpha, a color is solid.
{navy},0.5: navy, half see-throughx0B0C12,0.75: a dark grey, three-quarters solid{red},0: invisible (the same as {transparent})Numbers below 0 are treated as 0, and numbers above 1 as 1. An alpha that isn't a number is ignored, leaving the color solid.
Because a color field can hold two values, it is a vector field: the color is its first element and the alpha, if there is one, its second.
Reading the field gives both, joined together ({navy},0.5 reads back as navy0.5), and .# tells you whether an alpha was given (2) or not (1).
An alpha affects only the color it's given with, wherever that color is used (including where it's inherited). To make a whole tag see-through, including its text, border and everything inside it, use the opacity field instead.