Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Data/colours/color.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
gameGuideColor CDATA #IMPLIED
oneButtonDynamicOuterGuidesColor CDATA #IMPLIED
conversionNodeColor CDATA #IMPLIED
appearance (light|dark) #IMPLIED <!-- Light/dark classification for system appearance matching (see RFC 0007) -->
companion CDATA #IMPLIED <!-- Name of the opposite-appearance partner palette -->
>

<!-- Group Color Definition -->
Expand Down
34 changes: 34 additions & 0 deletions Data/colours/colour.default.dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE colors SYSTEM "color.dtd">
<!-- Dark companion of "Default" (RFC 0007). Inherits all node/group colours from
Default and overrides only the UI chrome so the canvas is legible on a dark
background. Switched to by dasher_set_appearance(ctx, 2) when Default is active. -->
<colors name="Default Dark"
parentName="Default"
appearance="dark"
companion="Default"
backgroundColor="#1E1E1E"
defaultLabelColor="#FFFFFF"
defaultOutlineColor="#3A3A3A"
crosshairColor="#FFFFFF"
inputLineColor="#FF5A5A"
inputPositionColor="#FFFFFF"
rootNodeColor="#2F5D2F"
conversionNodeColor="#6A6A6A"
selectionHighlightColor="#FF5A5A"
selectionInactiveColor="#7A2A2A"
circleOutlineColor="#CCCCCC"
circleStoppedColor="#FF5A5A"
circleWaitingColor="#FFCC00"
circleStartedColor="#5AFF5A"
firstStartBoxColor="#FF5A5A"
secondStartBoxColor="#FFCC00"
twoPushDynamicActiveMarkerColor="#5AFF5A"
twoPushDynamicInactiveMarkerColor="#55FFFF"
twoPushDynamicOuterGuidesColor="#2F5D2F"
infoTextColor="#FFFFFF"
infoTextBackgroundColor="#000000"
warningTextColor="#1E1E1E"
warningTextBackgroundColor="#FFCC00"
gameGuideColor="#FF99CC">
</colors>
33 changes: 33 additions & 0 deletions Data/colours/colour.euroasian.dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE colors SYSTEM "color.dtd">
<!-- Dark companion of "European/Asian (Original)" (RFC 0007). Inherits all
node/group colours and overrides only UI chrome for a dark background. -->
<colors name="European/Asian (Original) Dark"
parentName="European/Asian (Original)"
appearance="dark"
companion="European/Asian (Original)"
backgroundColor="#1E1E1E"
defaultLabelColor="#FFFFFF"
defaultOutlineColor="#3A3A3A"
crosshairColor="#FFFFFF"
inputLineColor="#FF5A5A"
inputPositionColor="#FFFFFF"
rootNodeColor="#2F5D2F"
conversionNodeColor="#6A6A6A"
selectionHighlightColor="#FF5A5A"
selectionInactiveColor="#7A2A2A"
circleOutlineColor="#CCCCCC"
circleStoppedColor="#FF5A5A"
circleWaitingColor="#FFCC00"
circleStartedColor="#5AFF5A"
firstStartBoxColor="#FF5A5A"
secondStartBoxColor="#FFCC00"
twoPushDynamicActiveMarkerColor="#5AFF5A"
twoPushDynamicInactiveMarkerColor="#55FFFF"
twoPushDynamicOuterGuidesColor="#2F5D2F"
infoTextColor="#FFFFFF"
infoTextBackgroundColor="#000000"
warningTextColor="#1E1E1E"
warningTextBackgroundColor="#FFCC00"
gameGuideColor="#FF99CC">
</colors>
33 changes: 33 additions & 0 deletions Data/colours/colour.euroasian2.dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE colors SYSTEM "color.dtd">
<!-- Dark companion of "European/Asian for Colourblind" (RFC 0007). Inherits all
node/group colours and overrides only UI chrome for a dark background. -->
<colors name="European/Asian for Colourblind Dark"
parentName="European/Asian for Colourblind"
appearance="dark"
companion="European/Asian for Colourblind"
backgroundColor="#1E1E1E"
defaultLabelColor="#FFFFFF"
defaultOutlineColor="#3A3A3A"
crosshairColor="#FFFFFF"
inputLineColor="#FF5A5A"
inputPositionColor="#FFFFFF"
rootNodeColor="#2F5D2F"
conversionNodeColor="#6A6A6A"
selectionHighlightColor="#FF5A5A"
selectionInactiveColor="#7A2A2A"
circleOutlineColor="#CCCCCC"
circleStoppedColor="#FF5A5A"
circleWaitingColor="#FFCC00"
circleStartedColor="#5AFF5A"
firstStartBoxColor="#FF5A5A"
secondStartBoxColor="#FFCC00"
twoPushDynamicActiveMarkerColor="#5AFF5A"
twoPushDynamicInactiveMarkerColor="#55FFFF"
twoPushDynamicOuterGuidesColor="#2F5D2F"
infoTextColor="#FFFFFF"
infoTextBackgroundColor="#000000"
warningTextColor="#1E1E1E"
warningTextBackgroundColor="#FFCC00"
gameGuideColor="#FF99CC">
</colors>
35 changes: 35 additions & 0 deletions Data/colours/colour.rainbow.dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE colors SYSTEM "color.dtd">
<!-- Dark companion of "Rainbow" (RFC 0007). Inherits Rainbow's letter/group
colours and overrides only UI chrome so the canvas reads on a dark
background. Switched to by dasher_set_appearance(ctx, 2) when Rainbow is
active. -->
<colors name="Rainbow Dark"
parentName="Rainbow"
appearance="dark"
companion="Rainbow"
backgroundColor="#1E1E1E"
defaultLabelColor="#FFFFFF"
defaultOutlineColor="#3A3A3A"
crosshairColor="#FFFFFF"
inputLineColor="#FF5A5A"
inputPositionColor="#FFFFFF"
rootNodeColor="#2F5D2F"
conversionNodeColor="#6A6A6A"
selectionHighlightColor="#FF5A5A"
selectionInactiveColor="#7A2A2A"
circleOutlineColor="#CCCCCC"
circleStoppedColor="#FF5A5A"
circleWaitingColor="#FFCC00"
circleStartedColor="#5AFF5A"
firstStartBoxColor="#FF5A5A"
secondStartBoxColor="#FFCC00"
twoPushDynamicActiveMarkerColor="#5AFF5A"
twoPushDynamicInactiveMarkerColor="#55FFFF"
twoPushDynamicOuterGuidesColor="#2F5D2F"
infoTextColor="#FFFFFF"
infoTextBackgroundColor="#000000"
warningTextColor="#1E1E1E"
warningTextBackgroundColor="#FFCC00"
gameGuideColor="#FF99CC">
</colors>
33 changes: 33 additions & 0 deletions Data/colours/colour.thai.dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE colors SYSTEM "color.dtd">
<!-- Dark companion of "Thai" (RFC 0007). Inherits all node/group colours and
overrides only UI chrome for a dark background. -->
<colors name="Thai Dark"
parentName="Thai"
appearance="dark"
companion="Thai"
backgroundColor="#1E1E1E"
defaultLabelColor="#FFFFFF"
defaultOutlineColor="#3A3A3A"
crosshairColor="#FFFFFF"
inputLineColor="#FF5A5A"
inputPositionColor="#FFFFFF"
rootNodeColor="#2F5D2F"
conversionNodeColor="#6A6A6A"
selectionHighlightColor="#FF5A5A"
selectionInactiveColor="#7A2A2A"
circleOutlineColor="#CCCCCC"
circleStoppedColor="#FF5A5A"
circleWaitingColor="#FFCC00"
circleStartedColor="#5AFF5A"
firstStartBoxColor="#FF5A5A"
secondStartBoxColor="#FFCC00"
twoPushDynamicActiveMarkerColor="#5AFF5A"
twoPushDynamicInactiveMarkerColor="#55FFFF"
twoPushDynamicOuterGuidesColor="#2F5D2F"
infoTextColor="#FFFFFF"
infoTextBackgroundColor="#000000"
warningTextColor="#1E1E1E"
warningTextBackgroundColor="#FFCC00"
gameGuideColor="#FF99CC">
</colors>
33 changes: 33 additions & 0 deletions Data/colours/colour.turbo.dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE colors SYSTEM "color.dtd">
<!-- Dark companion of "TurboLUT" (RFC 0007). Inherits all node/group colours and
overrides only UI chrome for a dark background. -->
<colors name="TurboLUT Dark"
parentName="TurboLUT"
appearance="dark"
companion="TurboLUT"
backgroundColor="#1E1E1E"
defaultLabelColor="#FFFFFF"
defaultOutlineColor="#3A3A3A"
crosshairColor="#FFFFFF"
inputLineColor="#FF5A5A"
inputPositionColor="#FFFFFF"
rootNodeColor="#2F5D2F"
conversionNodeColor="#6A6A6A"
selectionHighlightColor="#FF5A5A"
selectionInactiveColor="#7A2A2A"
circleOutlineColor="#CCCCCC"
circleStoppedColor="#FF5A5A"
circleWaitingColor="#FFCC00"
circleStartedColor="#5AFF5A"
firstStartBoxColor="#FF5A5A"
secondStartBoxColor="#FFCC00"
twoPushDynamicActiveMarkerColor="#5AFF5A"
twoPushDynamicInactiveMarkerColor="#55FFFF"
twoPushDynamicOuterGuidesColor="#2F5D2F"
infoTextColor="#FFFFFF"
infoTextBackgroundColor="#000000"
warningTextColor="#1E1E1E"
warningTextBackgroundColor="#FFCC00"
gameGuideColor="#FF99CC">
</colors>
33 changes: 33 additions & 0 deletions Data/colours/colour.vowels.dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE colors SYSTEM "color.dtd">
<!-- Dark companion of "Vowels" (RFC 0007). Inherits all node/group colours and
overrides only UI chrome for a dark background. -->
<colors name="Vowels Dark"
parentName="Vowels"
appearance="dark"
companion="Vowels"
backgroundColor="#1E1E1E"
defaultLabelColor="#FFFFFF"
defaultOutlineColor="#3A3A3A"
crosshairColor="#FFFFFF"
inputLineColor="#FF5A5A"
inputPositionColor="#FFFFFF"
rootNodeColor="#2F5D2F"
conversionNodeColor="#6A6A6A"
selectionHighlightColor="#FF5A5A"
selectionInactiveColor="#7A2A2A"
circleOutlineColor="#CCCCCC"
circleStoppedColor="#FF5A5A"
circleWaitingColor="#FFCC00"
circleStartedColor="#5AFF5A"
firstStartBoxColor="#FF5A5A"
secondStartBoxColor="#FFCC00"
twoPushDynamicActiveMarkerColor="#5AFF5A"
twoPushDynamicInactiveMarkerColor="#55FFFF"
twoPushDynamicOuterGuidesColor="#2F5D2F"
infoTextColor="#FFFFFF"
infoTextBackgroundColor="#000000"
warningTextColor="#1E1E1E"
warningTextBackgroundColor="#FFCC00"
gameGuideColor="#FF99CC">
</colors>
33 changes: 33 additions & 0 deletions Data/colours/colour.vowels2.dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE colors SYSTEM "color.dtd">
<!-- Dark companion of "Vowels2" (RFC 0007). Inherits all node/group colours and
overrides only UI chrome for a dark background. -->
<colors name="Vowels2 Dark"
parentName="Vowels2"
appearance="dark"
companion="Vowels2"
backgroundColor="#1E1E1E"
defaultLabelColor="#FFFFFF"
defaultOutlineColor="#3A3A3A"
crosshairColor="#FFFFFF"
inputLineColor="#FF5A5A"
inputPositionColor="#FFFFFF"
rootNodeColor="#2F5D2F"
conversionNodeColor="#6A6A6A"
selectionHighlightColor="#FF5A5A"
selectionInactiveColor="#7A2A2A"
circleOutlineColor="#CCCCCC"
circleStoppedColor="#FF5A5A"
circleWaitingColor="#FFCC00"
circleStartedColor="#5AFF5A"
firstStartBoxColor="#FF5A5A"
secondStartBoxColor="#FFCC00"
twoPushDynamicActiveMarkerColor="#5AFF5A"
twoPushDynamicInactiveMarkerColor="#55FFFF"
twoPushDynamicOuterGuidesColor="#2F5D2F"
infoTextColor="#FFFFFF"
infoTextBackgroundColor="#000000"
warningTextColor="#1E1E1E"
warningTextBackgroundColor="#FFCC00"
gameGuideColor="#FF99CC">
</colors>
18 changes: 18 additions & 0 deletions docs/C_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,24 @@ void dasher_set_palette(dasher_ctx* ctx, const char* palette_name);

`dasher_get_palette_preview_colors` writes 4 ARGB preview colours into `out_colors` (must have room for 4 ints). Returns 0 on success.

### Appearance / dark mode (RFC 0007)

Palettes may declare an `appearance` (`light`/`dark`) and a `companion` (their opposite-appearance partner) in their XML. Use these to follow the OS light/dark preference without hardcoding name pairs per frontend.

```c
int dasher_get_palette_appearance(dasher_ctx* ctx, int index); // 0=unspecified, 1=light, 2=dark, -1=oor
const char* dasher_find_companion_palette(dasher_ctx* ctx, const char* palette_name); // NULL if none
int dasher_set_appearance(dasher_ctx* ctx, int appearance); // 1=light, 2=dark; 0 on success, -1 if no companion
```

`dasher_set_appearance` switches the current palette to its companion that matches the requested appearance; if the current palette already matches it is a no-op. If no companion is available it returns `-1` and leaves the palette unchanged (the user's explicit choice is respected). Companion lookup is bidirectional, so legacy palettes without metadata are still paired with a dark companion that names them.

Typical frontend usage on an OS appearance change:

```c
dasher_set_appearance(ctx, is_dark ? 2 : 1);
```

## Game Mode

```c
Expand Down
Loading
Loading