core.colors module

Color scheme management.

core.colors.color_exists(filename)[source]

Returns whether a color scheme already exists.

Parameters:

filename – the filename to check.

core.colors.delete_colors(filename)[source]

Deletes a color scheme file.

Parameters:

filename – the filename to delete.

core.colors.get_colors(colorscheme=None)[source]

Returns RGB tuples for all 16 colors in <colorscheme>.txt, or data/init/colors.txt if no scheme is provided. On errors, returns an empty list.

core.colors.get_installed_file()[source]

Returns the name of the currently installed color scheme, or None.

core.colors.load_colors(filename)[source]

Replaces the current DF color scheme.

Parameters:

filename – The name of the new colorscheme to apply (extension optional). If no path is specified, file is assumed to be in LNP/Colors.

core.colors.read_colors()[source]

Returns a sorted tuple of color scheme basenames, in LNP/Colors.

core.colors.save_colors(filename)[source]

Save current keybindings to a file.

Parameters:

filename – the name of the new color scheme file.