Okay, it took a little bit of digging but I eventually found more about this via a link from the Wikipedia page.
* via <https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-F...> (search for "CSI Pm m Character Attributes (SGR)"):
If 88- or 256-color support is compiled, the following apply:
[snip]
o The 88- and 256-color support uses subparameters described
in ISO-8613-6 for indexed color. ISO-8613-6 also mentions
direct color, using a similar scheme. xterm supports
that, too.
o xterm allows either colons (standard) or semicolons
(legacy) to separate the subparameters (but after the
first colon, colons must be used).
The indexed- and direct-color features are summarized in the
FAQ, which explains why semicolon is accepted as a
subparameter delimiter:
Can I set a color by its number?
(This links to <
https://invisible-island.net/xterm/xterm.faq.html#color_by_n...>.)
The `ctlseqs` document continues:
These ISO-8613-6 controls (marked in ECMA-48 5th edition as
"reserved for future standardization") are supported by xterm:
[snip example with colons ":"]
This variation on ISO-8613-6 is supported for compatibility
with KDE konsole:
[snip example with semicolons ";"]
So, the confusion between use of ";" and ":" separators is because the RGB values are not actually
parameters (specified as separated by ";"), rather, the RGB values are
subparameters (specified as separated by ":"). [Edit #1]
This is covered in more detail by <https://invisible-island.net/xterm/xterm.faq.html#color_by_n...> (mentioned above):
We used semicolon (like other SGR parameters) for separating the R/G/B
values in the escape sequence, since a copy of ITU T.416 (ISO-8613-6)
which presumably clarified the use of colon for this feature was costly.
Using semicolon was incorrect because some applications could expect their
parameters to be order-independent. As used for the R/G/B values, that was
order-dependent. The relevant information, by the way, is part of ECMA-48
(not ITU T.416, as mentioned in Why only 16 (or 256) colors?). Quoting from
section 5.4.2 of ECMA-48, page 12, and adding emphasis (not in the
standard):
[snip]
Of course you will immediately recognize that 03/10 is ASCII colon,
and that ISO 8613-6 necessarily refers to the encoding in a parameter
sub-string. Or perhaps you will not.
:D
[snip]
Later, in 2012 (patch #282), I extended the parser to accommodate the
corrected syntax. The original remains, simply because of its widespread
use. As before, it took a few years for other terminal developers to
notice and start incorporating the improvement. As of March 2016, not
all had finished noticing.
[snip]
* Going forward (e.g., xterm patch #357), these terminfo building blocks
are used in ncurses:
* xterm+256color2 is the building-block for standard terminals
* xterm+256color is a building-block for nonstandard terminals
It's unfortunately seemingly not possible to directly link to the specific text but hopefully that's enough pointers for people to find it themselves.
Once again, seems it's amazing that anything works anywhere. :D
[Edit #1: Corrected from subparameter separator from "," (which is correct for one of the specs I read but incorrect here) to ":".]
[Edit #2: Typo fix.]