File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -117,9 +117,12 @@ def on_config(self, config):
117
117
if "palette" in theme :
118
118
palette = theme ["palette" ]
119
119
120
- # Use first palette, if multiple are defined
120
+ # Find first palette that includes primary color definition
121
121
if isinstance (palette , list ):
122
- palette = palette [0 ]
122
+ for p in palette :
123
+ if "primary" in p and p ["primary" ]:
124
+ palette = p
125
+ break
123
126
124
127
# Set colors according to palette
125
128
if "primary" in palette and palette ["primary" ]:
Original file line number Diff line number Diff line change @@ -117,9 +117,12 @@ def on_config(self, config):
117
117
if "palette" in theme :
118
118
palette = theme ["palette" ]
119
119
120
- # Use first palette, if multiple are defined
120
+ # Find first palette that includes primary color definition
121
121
if isinstance (palette , list ):
122
- palette = palette [0 ]
122
+ for p in palette :
123
+ if "primary" in p and p ["primary" ]:
124
+ palette = p
125
+ break
123
126
124
127
# Set colors according to palette
125
128
if "primary" in palette and palette ["primary" ]:
You can’t perform that action at this time.
0 commit comments