Skip to content

Commit a59356e

Browse files
committed
update docs for color-schemes
1 parent ca280f2 commit a59356e

1 file changed

Lines changed: 61 additions & 19 deletions

File tree

docs/color-schemes.rst

Lines changed: 61 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,73 @@
1-
21
color-schemes
32
=============
43

54
.. dfhack-tool::
6-
:summary: todo.
5+
:summary: Modify the colors used by the DF UI.
76
:tags: fort gameplay graphics
87

8+
This tool allows you to set exactly which shades of colors should be used in the
9+
DF interface color palette.
10+
11+
To set up the colors, you must first create at least one file with color
12+
definitions inside. These files must be in the same format as
13+
:file:`data/init/colors.txt` and contain RGB values for each of the color names.
14+
Just copy :file:`colors.txt` and edit the values for your custom color schemes.
15+
16+
If you are interested in alternate color schemes, also see:
17+
18+
- `gui/color-schemes`: the in-game GUI for this script
19+
- `season-palette`: automatically swaps color schemes when the season changes
20+
21+
Usage
22+
-----
23+
24+
``color-schemes register <directory> [-f] [-q]``
25+
Register the directory (relative to the main DF game directory) where your
26+
color scheme files are stored.
27+
``color-schemes list``
28+
List the color schemes from the registered directories.
29+
``color-schemes default set <scheme name> [-q]``
30+
Set the named color scheme as the default. This value is stored so you only
31+
have to set it once, even if you start a new adventure/fort.
32+
``color-schemes default load [-q]``
33+
Load the default color scheme that you previously set with ``default set``.
34+
``color-schemes load <scheme name> [-q]``
35+
Load the named color scheme.
36+
37+
Examples
38+
--------
39+
40+
Read your color scheme files from the :file:`colorschemes` directory (a
41+
directory you created and populated with color scheme files) and set the
42+
default to the scheme named ``mydefault``::
43+
44+
color-schemes register colorschemes
45+
color-schemes default set mydefault
46+
47+
Read your color scheme files from the :file:`colorschemes` directory (a
48+
directory you created and populated with color scheme files) and load the saved
49+
default. If you have a color scheme that you always want loaded, put these
50+
commands in your :file:`dfhack-config/init/dfhack.init` file::
951

10-
A script to manage color schemes.
52+
color-schemes -q register colorschemes
53+
color-schemes default load
1154

12-
Current features are :
13-
* :Registration:
14-
* :Loading:
15-
* :Listing:
16-
* :Default: Setting/Loading
55+
Options
56+
-------
1757

18-
For detailed information and usage, type ``color-schemes`` in console.
58+
``-f``, ``--force``
59+
Register and read color schemes that are incomplete or are syntactically
60+
incorrect.
61+
``-q``, ``--quiet``
62+
Don't print any informational output.
1963

20-
Loaded as a module, this script will export those methods :
21-
* register(path, force) : Register colors schemes by path (file or directory), relative to DF main directory
22-
* load(name) : Load a registered color scheme by name
23-
* list() : Return a list of registered color schemes
24-
* set_default(name) : Set the default color scheme
25-
* load_default() : Load the default color scheme
64+
API
65+
---
2666

27-
For more information about arguments and return values, see ``hack/scripts/color-schemes.lua``.
67+
When loaded as a module, this script will export the following functions:
2868

29-
Related scripts:
30-
* `gui/color-schemes` is the in-game GUI for this script.
31-
* `season-palette` swaps color schemes when the season changes.
69+
- ``register(path, force)`` : Register colors schemes by path (file or directory), relative to DF main directory
70+
- ``load(name)`` : Load a registered color scheme by name
71+
- ``list()`` : Return a list of registered color schemes
72+
- ``set_default(name)`` : Set the default color scheme
73+
- ``load_default()`` : Load the default color scheme

0 commit comments

Comments
 (0)