Gray text will change to black with blue background

Problem description: I’m basically trying to create chess in Replit. I’m using letters to represent pieces on the board, so each letter has to be colored black or gray and assigned a background color, white or blue depending on whether it’s on a light or dark square. All the black letters work fine, but gray letters will turn black on the blue squares.

Expected behavior: All of the gray letters display as gray with white and blue backgrounds.

Actual behavior: Only the gray letters on white backgrounds display as gray, the ones with blue backgrounds display as black.

Steps to reproduce:
print(“\033[1;36;44mtest”)
print(“\033[1;36;47mtest”)

Bug appears at this link:
https://replit.com/@programming-1-callaghan-spri/Unit-2-Lab-4-Game-Loop-solo-MatthewSimpso12

Browser/OS/Device:
Chromebook

Welcome to the community, @MatthewSimpso12! Could you just make the colors black and white like a normal chessboard?

1 Like

And then you could make the background blue and green or smth like that.

1 Like

Thanks for the suggestion! I’ll use this idea unless someone can figure out how to make the pieces look more black-and-white.

1 Like

You could use lowercase letters for black and uppercase for white, like in a FEN

2 Likes

You might want to look into rich, a library to customize text in the terminal

Also, your link appears to be broken, as it gives a 404. Please update it :slight_smile:

3 Likes

Yup, that’s why I couldn’t really give advice on the actual code :rofl:

Wait, is this a school assignment?

1 Like

Colors are broken on Replit

1 Like