Skip to content
Open
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
3 changes: 3 additions & 0 deletions colormaestro/formatters/css.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ def generate(palette):
Returns:
str: CSS variables definition
"""
if not palette:
return ":root {\n}\n"

css = ":root {\n"

# Add color variables
Expand Down
2 changes: 1 addition & 1 deletion tests/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def test_basic_generation(self):
def test_dark_mode(self):
"""Test dark mode UI palette generation"""
base_color = SAMPLE_COLORS['blue']
palette = ui_palette.generate(base_color, 5, dark=True)
palette = ui_palette.generate(base_color, 5, dark_mode=True)

# Check that the palette has the correct length
assert len(palette) == 5
Expand Down