oakmac / chessboardjs

JavaScript chessboard
https://chessboardjs.com
MIT License
1.98k stars 408 forks source link

Suggestion: a chessboard config option for square color #209

Open justingolden21 opened 3 years ago

justingolden21 commented 3 years ago

Suggestion: a chessboard config option for square color

Something like whiteSquareColor: '#fff'

For example:

board = Chessboard('board', {
  position: 'start',
  whiteSquareColor: '#fff',
  blackSquareColor: '#000',
});

This feels like a very basic feature and one that shouldn't be handled by working around chessboard.js but rather handled by chessboard itself.

Thank you for listening to my feedback : )

justingolden21 commented 3 years ago

Just found this: https://www.chessable.com/discussion/thread/198273/change-board-colour-css/

.white-1e1d7{background-color:#b0b9b4 !important;color:#6d8873 !important}
.black-3c85d{background-color:#6d8873 !important;color:#b0b9b4 !important}

image

it seems like

.white-1e1d7{background-color:#b0b9b4;}
.black-3c85d{background-color:#6d8873;}

works just fine though.

I still think this should be handled by chessboard.js for good code, but this gets the job done until then. Just my 2 cents.