Files
userstyles/styles/chess.com/scripts/generate/generate/__init__.py
T
uncenter c4a66ca874 refactor(chess.com): update generate script (#625)
* refactor(chess.com): update generate script

* fix(chess.com): use identifier instead of name for generate script

* chore(chess.com): update assets

* ci(typos): remove python ignores
2024-03-06 08:27:22 +00:00

29 lines
934 B
Python

from catppuccin import PALETTE
from boardinator.boardinator import replace_colors
def generate_boards():
for flavor in PALETTE:
for color in flavor.colors:
if not color.accent:
continue
color_dict = {
# Light grayish yellow green
(237, 238, 209): (
flavor.colors.base.rgb.r,
flavor.colors.base.rgb.g,
flavor.colors.base.rgb.b,
),
# Dark grayish yellow green
(119, 153, 82): (
color.rgb.r,
color.rgb.g,
color.rgb.b,
),
}
replace_colors(
image_path="../../assets/base/colorboard.png",
output_path=f"../../assets/{flavor.identifier}/{color.identifier}.png",
color_dict=color_dict,
)