bugfix: return text if no color, more debug infos

use global colormap_idx
Make default colormaps work.

Overwrite default colormaps only if asked.
Correctly interpret integers in mode().
Test registered colormaps after specials.
Silently ignore duplicated external palettes.
Add a set_special_colormaps function.
Do not sue ANSI_min/max as limits for the whole ANSI range.
Move global variables at the top of the file.
Bring global context variables to the themes.

Encapsulate global variables in the `context` dictionary.
Pass the context through the called themes, that can thus change the configuration.
Special `random` color set can be changed as a colormap

Add random among the colormaps, if this colormap is changed, it will pick random colors in it.
bugfix: random in 8-colors mode with user-defined default colormap
bugfix: use the full `scale` range

Was using scale[1:] colors instead of scale[:]