Skip to content

Commit

Permalink
Minor improvements to theme docs (#713)
Browse files Browse the repository at this point in the history
* Minor improvements to theme docs

At some point the theme file went to JSON but the territory examples were still in python. Also, `theme-<whatever>.json` is better.

* remove highlighting

The comments and examples are useful but not valid json - it's okay to just not use syntax highlighting I think.
  • Loading branch information
milescrawford authored Sep 29, 2024
1 parent cf8ca1a commit 409a16b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions THEMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Version 1.7 brings basic support for themes, and 1.9 extends it to include keybo
## Creating and editing themes

* Look at the `Theme` class in [`katrain/gui/theme.py`](https://github.com/sanderland/katrain/blob/master/katrain/gui/theme.py).
* Make a `theme<yourthemename>.json` file in your `<home dir>/.katrain` directory and specify any variables from the above class you want to override, e.g.
* Make a `theme-<yourthemename>.json` file in your `<home dir>/.katrain` directory and specify any variables from the above class you want to override, e.g.
```json
{
"BACKGROUND_COLOR": [1,0,0,1],
Expand Down Expand Up @@ -41,12 +41,14 @@ Version 1.7 brings basic support for themes, and 1.9 extends it to include keybo
The stone marks, transparency, and territory style are independent; the table above presents a collection of possible variants.
The relevant variables are:
```
TERRITORY_DISPLAY = "blended" | "shaded" | "marks" | "blocks"
STONE_MARKS = "all" | "weak" | "none"
OWNERSHIP_COLORS = {"B": [0.0, 0.0, 0.10, 0.75], "W": [0.92, 0.92, 1.0, 0.800]}
BLOCKS_THRESHOLD = 0.6
MARK_SIZE = 0.42 # as fraction of stone size
STONE_MIN_ALPHA = 0.5
{
"TERRITORY_DISPLAY" : "blended" | "shaded" | "marks" | "blocks",
"STONE_MARKS" : "all" | "weak" | "none",
"OWNERSHIP_COLORS" : {"B": [0.0, 0.0, 0.10, 0.75], "W": [0.92, 0.92, 1.0, 0.800]},
"BLOCKS_THRESHOLD" : 0.6,
"MARK_SIZE" : 0.42, # as fraction of stone size
"STONE_MIN_ALPHA" : 0.5
}
```

The colors are specified as RGB values and a maximum alpha transparency.
Expand Down

0 comments on commit 409a16b

Please sign in to comment.