def build_color_tables(base=color_tables.vga_palette4):
base = [] if base is None else base<EOL>table4 = _build_color_table(base, extended=False)<EOL>if table4:<EOL><INDENT>color_table4.clear()<EOL>color_table4.extend(table4)<EOL><DEDENT>table8 = _build_color_table(base)<EOL>if table8:<EOL><INDENT>color_table8.clear()<EOL>color_table8.extend(table8)<EOL><DEDENT>
Create the color tables for palette downgrade support,
starting with the platform-specific 16 from the color tables module.
Save as global state. :-/