FreeBSD console imitates xterm using teken (see earlier discussion here, and mailing list). It is not a complete implementation; the FreeBSD developers have trimmed out a few items from the terminal description (making the real xterm less useful on that platform).
FreeBSD console (teken) doesn't actually implement 256 colors. See the source-code:
499 /**
500 * The xterm-256 color map has steps of 0x28 (in the range 0-0xff), except
501 * for the first step which is 0x5f. Scale to the range 0-6 by dividing
502 * by 0x28 and rounding down. The range of 0-5 cannot represent the
503 * larger first step.
504 *
505 * This table is generated by the follow rules:
506 * - if all components are equal, the result is black for (0, 0, 0) and
507 * (2, 2, 2), else white; otherwise:
508 * - subtract the smallest component from all components
509 * - if this gives only one nonzero component, then that is the color
510 * - else if one component is 2 or more larger than the other nonzero one,
511 * then that component gives the color
512 * - else there are 2 nonzero components. The color is that of a small
513 * equal mixture of these components (cyan, yellow or magenta). E.g.,
514 * (0, 5, 6) (Turquoise2) is a much purer cyan than (0, 2, 3)
515 * (DeepSkyBlue4), but we map both to cyan since we can't represent
516 * delicate shades of either blue or cyan and blue would be worse.
517 * Here it is important that components of 1 never occur. Blue would
518 * be twice as large as green in (0, 1, 2).
519 */
Those steps map application's attempts to use 256 colors onto the console's 16 colors.
Since it's not capable of doing what's asked, setting TERM
to xterm-256color
will not be very effective.
The rgb code is supported in a different part of the kernel, which lets one set the values in the (16-)color palette:
41 static struct {
42 unsigned char r; /* Red percentage value. */
43 unsigned char g; /* Green percentage value. */
44 unsigned char b; /* Blue percentage value. */
45 } color_def[NCOLORS] = {
46 {0, 0, 0}, /* black */
47 {50, 0, 0}, /* dark red */
48 {0, 50, 0}, /* dark green */
49 {77, 63, 0}, /* dark yellow */
50 {20, 40, 64}, /* dark blue */
51 {50, 0, 50}, /* dark magenta */
52 {0, 50, 50}, /* dark cyan */
53 {75, 75, 75}, /* light gray */
54
55 {18, 20, 21}, /* dark gray */
56 {100, 0, 0}, /* light red */
57 {0, 100, 0}, /* light green */
58 {100, 100, 0}, /* light yellow */
59 {45, 62, 81}, /* light blue */
60 {100, 0, 100}, /* light magenta */
61 {0, 100, 100}, /* light cyan */
62 {100, 100, 100}, /* white */
63 };
In the mailing list, I mentioned these screenshots:

kern.vt.color.X.rgb
)? So there is no way to make the console support more than 8 colors? – Tommiie Dec 04 '18 at 21:04