Skip to main content

Convert Forsyth–Edwards Notation (FEN) to a 2D chessboard PIL image

Project description

fen2pil

Convert Forsyth–Edwards Notation (FEN) to a 2D chessboard PIL image.

from fen2pil import draw

fen = "r1bqkb1r/pppp1ppp/2n2n2/4p3/2B1P3/3P1N2/PPP2PPP/RNBQ1RK1 w Qkq - 0 1"

pil_image = draw.transform_fen_pil(
        fen=fen,
        board_size=480,
        light_color=(255, 253, 208),
        dark_color=(76, 153, 0)
    )

pil_image.show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fen2pil-0.3.0.tar.gz (67.3 kB view hashes)

Uploaded Source

Built Distribution

fen2pil-0.3.0-py3-none-any.whl (27.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page