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):
117117 if "palette" in theme :
118118 palette = theme ["palette" ]
119119
120- # Use first palette, if multiple are defined
120+ # Find first palette that includes primary color definition
121121 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
123126
124127 # Set colors according to palette
125128 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):
117117 if "palette" in theme :
118118 palette = theme ["palette" ]
119119
120- # Use first palette, if multiple are defined
120+ # Find first palette that includes primary color definition
121121 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
123126
124127 # Set colors according to palette
125128 if "primary" in palette and palette ["primary" ]:
You can’t perform that action at this time.
0 commit comments