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

Can the text color of the win rate percentage be dynamically changed? #94

Open
qcgm1978 opened this issue Oct 11, 2023 · 3 comments
Open

Comments

@qcgm1978
Copy link
Contributor

The current win rate is displayed in white, which is easily misleading as to the win rate of white chess. Additionally, the color has no correlation with the win rate itself. It is possible to consider dynamically setting it to other colors, for example, the following modification:

const get_color = (percent) => {
    if (percent < 40) {
        return 'red';
    } else if (percent < 60) {
        return 'orange';
    } else if (percent < 80) {
        return 'yellow';
    } else {
        return 'green';
    }
}
function draw_winrate_graph_current(g) {
    ...
    g.strokeStyle = g.fillStyle = get_color(percent);
    fill_text(g, unit * 2, `${percent}%`, ...here)
    g.restore()
}
2023-10-11.21-58-08.mp4
@kaorahi
Copy link
Owner

kaorahi commented Oct 12, 2023

Oh, I hadn't noticed that this white lettering can be misleading. Color design is really difficult...

Since this is the first complaint I've received about this issue, I'd like to postpone making a decision until we gather more feedback from other users.

We need to remind ourselves that simple change in text color can cause a readability problem when it is placed over the winrate line. It may be necessary to redesign the colors of all elements together. This is not a small task in my impression.

@kaorahi
Copy link
Owner

kaorahi commented Oct 18, 2023

By the way, I was really surprised to see that you disabled "Lizzie style" in your movie. I thought I was the only one who prefers "annoying red lines across the board" over "many small digits that strain the eyes".

@qcgm1978
Copy link
Contributor Author

I really don't like seeing too many numbers on the board, and I want to record videos by autoplaying them, so I don't need those numbers either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants