C
C#2y 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
Thinker2y ago
ConsoleColor is only 16 colors iirc? If you want a smoother gradient then you could check out $spectre
MODiX
MODiX2y 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
FaceboiiiOP2y ago
Thanks, I'll look into it!
Accord
Accord2y 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