Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the color of board squares and pieces #13

Closed
yo35 opened this issue Jun 19, 2014 · 6 comments
Closed

Changing the color of board squares and pieces #13

yo35 opened this issue Jun 19, 2014 · 6 comments

Comments

@yo35
Copy link
Owner

yo35 commented Jun 19, 2014

dawidziolkowski said:

What is the best way to change color of the board squares and pieces? As i see the colors code are hardcoded in files, can't change easily with CSS. Could please add some classes for light and dark square so it would be possible to easy style it (or maybe add options in backend to change colors)?

@yo35
Copy link
Owner Author

yo35 commented Jun 19, 2014

More generally, it would be nice to have a system of theme/skin (as jQuery UI has for instance) to customize the appearance of the chessboards.

This is quite a lot of work, so I will not doing it right now. However, I could add CSS classes for light and dark squares quite rapidly, so that you will be able change the color of board squares with a piece of CSS code. I will try to do it in the next days (before the end of June).

@dawidziolkowski
Copy link

Thank you for such comprehensive answer. It's true that my previous question was a bit unclear. I wrote comment on Github yesterday explaining my point of view, but accidentally form was deleted, so in short:

  1. Chess font in notation is great improvement and I think Alpha font is really good. Moroever you can change it by CSS so it's even better.
  2. I was thinking about including chess font (instead of bitmaps) in chessboard (diagram), but i'm not sure if it is possible / worth of doing (i'm not so good in javascript). I thought it would be better for performance (loading speed) but i'm not sure. Also it would be possible to change the color of pieces easily (eg. for dark brown and light brown instead of black and white).
    2a) If changing bitmaps to fonts won't be included in next verisons (or won't be included in near future) I think it will be better for me (and everybody who want change the look of chess pieces) just to prepare own sprite file with bitmaps. IMHO recent pieces bitmaps are not bad, but needs a small "lifting" - smooth edges, maybe smaller size. Please tell me what do you think and what are your plans.
  3. As you said earlier long-term solution for flexibility and customizations would be to include options in wordpress admin panel (eg. changing colors, chess fonts, sizes etc). but I have full understanding that this is time-consuming. You do a really good job anyway pushing this script forward so quickly.

@yo35
Copy link
Owner Author

yo35 commented Jun 26, 2014

To answer your second point, I would say that, in my opinion, changing bitmaps for fonts in diagrams is not a good idea:

  • the performance gain is rather hypothetic (depending on how web browsers manage fonts, it even may be slower),
  • this might induce some (maybe browser-dependent) issues to ensure that the chess pieces have the appropriate size, and are vertically and horizontally aligned with the center of the square.
    So I think this modification will not be included in future versions.

However, I agree that it would be useful to allow chess piece customization in the diagrams. I think that, in future versions, several sets of sprite files will be included with the plugin (please feel free to suggest some).

@yo35
Copy link
Owner Author

yo35 commented Jun 27, 2014

Version 2.99.1 (just released) provides CSS classes for dark- and light-squares.

@yo35 yo35 mentioned this issue Feb 8, 2015
@yo35
Copy link
Owner Author

yo35 commented Mar 10, 2016

In version 4.3, it is possible to change the default color/piece themes. However, alternative themes must be chosen among the ones included with the plugin: users cannot build their own color/piece themes. This feature will be implemented in a future version.

@yo35
Copy link
Owner Author

yo35 commented Oct 15, 2016

As of version 4.5, users can create their own color/piece themes.

@yo35 yo35 closed this as completed Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants