This is more a ‘wow, I can’t believe that happened’ than anything, but might be useful if someone is having the same trouble I had.
[TL/DR] - If you find your GREEN text prints ORANGE, check your Theme. If it’s Halloween/Spooky, that might be the cause.
[TL/DR-2] - OK, if you find you have trouble with ANY text color, check your Theme. If Spooky caused this, other themes might cause other problems.
[Story behind it]
So, I chose the Spooky/Halloween theme for my Replit IDE because why not.
I’m working on Day 42 - Make a MokéBeast and the assignment included coloring the output text based on the MokéBeast type (Earth, Air, Fire, Water). I thought orange would be good for Fire, but recalled in previous attempts that there really isn’t an orange in ANSI. Admittedly, yellow looks kinda orange-ish, but not really.
I did up my code with Earth set to green (033[0;32m
). When I tested it, the text for Fire type came out a nice, bright ORANGE!
Woo hoo! I found orange, right? Wrong. I found ‘not green’.
I spent nearly 45 minutes trying to figure out why the OTHER colors all seemed to work fine, but Green was Orange. Then I remembered Halloween/Spooky theme and set it back to Dark. Now my green is, indeed, green.
As happy as I am that I got the Earth color green, I truly wish I could make my Fire text orange.
I hope this brings a smile and maybe even helps if someone has some trouble.
I also hope these topics are searchable so someone can find it easier if they need it.
1 Like
perhaps RGB colors?
2 Likes
Oooo… I didn’t know Python could RGB! Now I have something new to look into. Thanks python660!
2 Likes
These escape codes work on any language
Given that they’re called ‘escape’ codes, I shouldn’t be surprised! I’ve been so busy looking at the 100 Days stuff that I haven’t really thought about stuff like that.
I’m definitely going to have some fun with this!
2 Likes