Skip to content

Generate a chess board image given a FEN, à la Lichess style.

License

Notifications You must be signed in to change notification settings

Hart-House-Chess-Club/fen-to-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fen-to-image

Generate a chess board image given a FEN, à la Lichess style.

Installation

fentoimage is available on PyPI.

pip install fentoimage

Example Usage

import chess

from fentoimage.board import BoardImage

fen = "rnbqk1nr/pppp1ppp/8/4p3/1bP5/2N5/PP1PPPPP/R1BQKBNR w KQkq - 2 3"
renderer = BoardImage(fen)
image = renderer.render(highlighted_squares=(chess.F8, chess.B4))
image.show()

Example Output

English Opening: King's English Variation, Kramnik-Shirov Counterattack

About

Generate a chess board image given a FEN, à la Lichess style.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages