C
C#13mo ago
Faceboiii

❔ Best way to convert rgb to ConsoleColor?

Hey, so I have a Console App, where I want to transition between 2 colors( and output the color as backgroundcolor). I have the main code from ChatGPT for test cases, and the RGBToConsoleColor from stackoverflow. However, the transition seems kinda buggy (when transitioning from black to white it goes black, green, light gray, dark gray, white). Does anyone know a better/more accurate way to convert rgb values to ConsoleColor?
5 Replies
Thinker
Thinker13mo ago
ConsoleColor is only 16 colors iirc? If you want a smoother gradient then you could check out $spectre
MODiX
MODiX13mo ago
Spectre.Console is a .NET library that allows for easy creation of console UIs, text formatting in the console, and command-line argument parsing. https://spectreconsole.net/
Spectre.Console - Welcome!
Spectre.Console is a .NET library that makes it easier to create beautiful console applications.
Faceboiii
Faceboiii13mo ago
Thanks, I'll look into it!
Accord
Accord13mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts