Hi I got a quick question. Is there any way i can change the background color and the text color within my compiler of dev-c++. I'm not trying to change the color of the output when I run the program, I'm talking about the actual code itself and its compiler.

I'm using Dev-C++ 4.9.9.2

Dani AI

Generated

In Dev-C++ you can theme both the editor background and the syntax colors. Beyond choosing a preset scheme, you can fine-tune individual elements so your selection text remains readable on dark backgrounds. Open Tools > Editor Options, then use the Colors/Syntax tab to adjust token categories (keywords, comments, strings, numbers, preprocessor), as well as non-code UI like the editor background, selection background, current-line highlight, and the line-number gutter. Pick a high-contrast pair for selection colors, and verify brace-matching and search highlight colors remain visible with your background. You can also change the editor font and size in the same area; a monospaced font with good weight and hinting helps on high-DPI displays.

Note that editor theming is separate from your program’s console colors. The IDE cannot recolor your runtime output; that is controlled by the console itself or by your code. On Windows you would call the Console API (see Microsoft’s docs for SetConsoleTextAttribute at https://learn.microsoft.com/windows/console/setconsoletextattribute), and on ANSI-capable terminals you can use escape sequences (VT sequences) as documented at https://learn.microsoft.com/windows/console/console-virtual-terminal-sequences.

If you are on a very old Bloodshed build, newer forks (for example Embarcadero Dev-C++) offer more robust theme handling and better Windows 10/11 compatibility: https://github.com/Embarcadero/Dev-Cpp.

Recommended Answers

All 5 Replies

This is likely a code editor issue. What editor are you using? The Windows VS editor, Eclipse, or something else?

I'm using Dev-C++ 4.9.9.2

There is no error, it's fine, i just want to know if i have the capabilities in this program to change the code's color and its background.

I figured out how to do it, just in case someone reads this in the future, go to tools > editor options > Syntax > select the drop down menu for "Color Speed Settings". I chose matrix because thats the color scheme I was looking for

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.