Code::Blocks is mostly used opensource IDE due its great features. Code::Blocks is lightweight and easy to use. Becoming opensource it is also available for Linux and is free to download and use. It is best IDE for beginners, who wants to learn C, C++ and FORTRAN and for creating small projects. However for large projects Code::Blocks may not be good.
Code::Blocks comes with light theme by default and not all users like it. There is no option to change the editor theme is Code::Blocks however we can change it manually. Here is how to install Code::Blocks themes.
Theme download link is given at the end of this post.
Available Code::Blocks Themes
- Son of Obsidian (my favorite)
- Sublime
- Oblivion
- Vim
- Dark gray
- KFT2
- Bright yellow
- Espresso Libre
- Modnokai Coffee
- Modnokai Night Shift
- Modnokai night Shift v2
- Slush and Poppies
- Solarized Dark
- Solarized Light
How to install CodeBlocks theme?
First you need to download the themes, download it from here: Code::Blocks Theme. Then extract it on the desktop. Close the CodeBlocks application before opening CB Share Config. CB Share Config is a tool that installs along with CodeBlocks. It can be found in Program list.
- Exit CodeBlocks if already opened.
- Open CodeBlock Share Config
- Browser Destination Configuration file which is in right side.
- Select default.conf
- Browse Source Configuration file which is in left side.
- Select the downloaded theme.conf
- Tick all the checkbox that appeared in source configuration file, which is in right side. (You can use space to tick)
- Click on Transfer and then Save, and then Close.
- Now open CodeBlocks, goto Settings>>Editor>>Syntax Highlighting and then Color Themes.
For Linux/Ubuntu
Open CB Share Config using: $ cb_share_config
. Then follow the above steps for windows.
For Mac
default.conf
is located at ~/Library/Application Support/codeblocks/default.conf
and cb_share_config is under CodeBlocks.app/Contents/MacOS/cb_share_config
. The <strong>Library</strong>
folder is by default hidden by the most recent version of Mac OX. You could use COMMAND+SHIFT+G
to navigate to hidden folders.
Watch this video to learn how to install dark themes in CodeBlocks
- If you don’t have
default.conf
file inside CodeBlocks directory try creating a project, it will be generated. - If background of line number did not change go to settings > environment settings > colors. Then edit the following; editor-caret,line number background color, line number foreground number, margin chrome color, margin chrome highlight color.
Downloads
Google Drive – https://drive.google.com/open?id=1qj6UpKXokr_QHLrRalMrTcMjsed8vKcI
Also see – How can you Activate Windows 10 for Free
ZippyShare – https://www54.zippyshare.com/v/FZCpqIEx/file.html
Important Links
Code::Blocks Forum: http://forums.codeblocks.org/
Source : http://wiki.codeblocks.org/index.php/Syntax_highlighting_custom_colour_themes
Problem finding default.conf file?
You may want to read FAQ – http://wiki.codeblocks.org/index.php/FAQ-Settings
Thanks
You are good
Thank you so much.
There is no cb_share_config.exe file with the Code::blocks install I have …
You can find CB Share in the installation directory. If it is not there reinstall Code::Blocks and select CB Share also while installing.
Ok, I did everything according to instructions, downloaded the colorschemes.conf, merged it with default.conf
using the share tool, enabled the theme in the editor settings, and I get the right theme in the code preview window, but when I go to the real window and open a new project or file, it is still just black on white! It just doesn’t work … I cant use an editor with white background.
It is because you have not saved your file yet. Save your new file (CTRL+S) and give an extension (if you are doing C++, newfile.cpp), now it should work.
Hi
I used your instructions to change my theme to dark in windows but is there a way to change my Code::Blocks theme in Linux Ubuntu?
Open CB Share Config using:
$ cb_share_config
. Then follow the above steps for windows.$ cb_share_config
exactly the same steps
Now I’ve Color themes on Fedora 29
Thanks for trying with Linux. I never tried that. I have updated the post.
So I have done this successfully however I was wondering if there is an easy way to modify the colors of the CodeBlocks IDE that are not associated with the text editor. I would like to make the “windows” dark themed. Thanks.
Thanks for your valuable comment. Only the color of editor can be changed.
Great man.. Really Helpful…But themes was found under customized themes which was extracted to the desktop…
*To those who may not find it..
thnx a lot man!!
how to revert back to original theme?
I have not saved the original file.
Delete the configuration file or restore default settings.
How to Make it fully Dark. I mean the whole interface not only editor.
It is not available in Windows.
use high contrast theme for desktop background.
personalize>>high contrast theme
Hi. Where could you find this option ?
He is talking about high contrast theme in Windows 10.
i dont have the defualt..conf on my code blocks folder
Sorry, create a project in CodeBlocks. That file will be generated..
i created new project but cant find default.conf file
Me too
I don’t use CodeBlocks now but when creating new project default configuration were generated. You could also try reinstalling it.
I think in newer versions of CodeBlocks utility “CB Share Config” renamed to “CodeBlocks Share Config”, this might lead to confusion.
Thanks for your kind response. I will update the post shortly.
Thanks!
I did what was in the article and it worked but the left bar of the editor which has the line numbers stays white regardless of theme, how can i change that?
That should be set manually from appearance settings. Go to settings > environment settings > colors. Then edit the following; editor-caret,line number background color, line number foreground number, margin chrome color, margin chrome highlight color. Shout me if u need further help.
Thanks for the post.
I have tried it, but after following the instruction, the “colour theme” setting in Editor settings -> syntax highlighting can only be set to Default, as if I have done nothing.
Do you know what happened?
I did clicked transfer, save and close… 🙁
Solved : i had two default.conf files ._.
thanks 🙂
😉
Hello!
I use Code::Blocks installed from ports at FreeBSD 12.1. There is cb_share_config tool, but I have no idea where default.conf is located.
Maybe somebody knows?
Have you read this FAQ? http://wiki.codeblocks.org/index.php/FAQ-Settings
According to this default.conf may be located in your home folder.
In my Arch Linux it is under ~/.config/codeblocks/.
Thanks. I’ve done it. I don’t know why it so hard to find a true Obsidian theme.
Thanks…………………………………………………………………..
Now it’s not working, don’t recomend.
24.03.2020 Works perfectly, thanks!
thank you very much sangam
You are welcome.
Thanks for this Mr. Sangam. Its a great modification in the theme of code::blocks editor. It’s very useful for me when I code for a longer period of time.
hey…Thanks a lot for the post. Editor turned to dark mode but the number line
I cant find colors under environment setting.
Editor turned dark but not the number line.*
If background of line number did not change go to settings > environment settings > colors. Then edit the following; editor-caret,line number background color, line number foreground number, margin chrome color, margin chrome highlight color.
after installing this my CB takes 20-30 seconds to startup!!! What happend?
i tried reinstalling it for 3 times and still startup is slow.
I don’t know may be it is loading theme and configurations.
Thanks a lot Dear Sangam….
Hi, Sangam!
Dark themes only work for C/C++ code, aren’t they?
I tell you because I work Fortran code and any dark theme don’t work, just on my C/C++ code.
Thanks for informing Hugo 😊.
can you please help me find default.conf?
There is a .bat file inside the downloaded archive that will help you to find default.conf.
Cool♥️
thanks… its really nice
i did it thanks a lot. but just editor text changed. how can i change color of upper bar and management arena to dark mode?
Its only for editor.
¡It works! Thanks.
¡It works!. Thanks.
how to turn whole UI into dark?
Thank you a lot sir!
MY code block are not setting up the theme, how do I setup now ???
“Tick all the checkbox that appeared in source configuration file, which is in right side. (You can use space to tick)”
Correction: Which is at the left side…
“Browser Destination Configuration file which is in right side.”
Correction: Browse… (without the +r)
default.conf is at c:\Users\\AppData\Roaming\CodeBlocks\
But you have to set ‘show hidden folders/files’ (or something like that) in whatever file manager you use.
Thank you for the correction. This post has been for three years, no one noticed that, even I didn’t noticed that. Lol. I will update my post shortly..
very well. thank you
Works perfectly. Linux AntiX 19.3 and CodeBlocks 16.01. Thank you very much, Sangam!
Hello, The procedure works for C/C++, for for Fotran it doesn’t work. I’ve CB 17.
Can you please help? Thx
I checked all the boxes, but is says that at least one configuration is empty or invalid
Works Perfectly >>> I’ve discovered hot to access the black theme finally my eyes are not burnt out!
installed VSCode! :))))))
what next after selecting color theme
Really when someone doesn’t be aware of then its up to other viewers
that they will assist, so here it takes place.
Good work! Thx a lot!