You are currently viewing How To Install Dark Themes In Code::Blocks

How To Install Dark Themes In Code::Blocks

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 Library 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

Installing Code::Blocks themes
  • 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

This Post Has 64 Comments

  1. Alilion

    Thanks
    You are good

  2. Josh

    Thank you so much.

  3. Chrs

    There is no cb_share_config.exe file with the Code::blocks install I have …

    1. Sangam Shrestha

      You can find CB Share in the installation directory. If it is not there reinstall Code::Blocks and select CB Share also while installing.

  4. Chris

    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.

    1. Sangam Shrestha

      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.

  5. Shadman

    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?

    1. Sangam Shrestha

      Open CB Share Config using: $ cb_share_config. Then follow the above steps for windows.

    2. tito

      $ cb_share_config
      exactly the same steps
      Now I’ve Color themes on Fedora 29

      1. Sangam Shrestha

        Thanks for trying with Linux. I never tried that. I have updated the post.

  6. Michael

    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.

    1. Sangam Shrestha

      Thanks for your valuable comment. Only the color of editor can be changed.

  7. Samuel

    Great man.. Really Helpful…But themes was found under customized themes which was extracted to the desktop…
    *To those who may not find it..

  8. Parin

    thnx a lot man!!

  9. ved

    how to revert back to original theme?
    I have not saved the original file.

  10. Hammad-Ur-Rehman

    How to Make it fully Dark. I mean the whole interface not only editor.

    1. emtias

      use high contrast theme for desktop background.
      personalize>>high contrast theme

      1. Jean

        Hi. Where could you find this option ?

        1. Sangam

          He is talking about high contrast theme in Windows 10.

  11. ruby

    i dont have the defualt..conf on my code blocks folder

    1. Sangam Shrestha

      Sorry, create a project in CodeBlocks. That file will be generated..

      1. vikram

        i created new project but cant find default.conf file

  12. 5n1p3r_4rt3m1s

    I think in newer versions of CodeBlocks utility “CB Share Config” renamed to “CodeBlocks Share Config”, this might lead to confusion.

  13. Izmox

    Thanks!

  14. fsda

    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?

    1. Sangam

      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.

  15. Nathan

    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… 🙁

    1. Nathan

      Solved : i had two default.conf files ._.
      thanks 🙂

      1. Sangam

        😉

  16. Lemalex

    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?

  17. Thành TC

    Thanks. I’ve done it. I don’t know why it so hard to find a true Obsidian theme.

  18. Mokhsedul Haque

    Thanks…………………………………………………………………..

  19. Try

    Now it’s not working, don’t recomend.

  20. lostted

    24.03.2020 Works perfectly, thanks!

  21. Alex Bodnaru

    thank you very much sangam

  22. Raffy

    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.

  23. samy

    hey…Thanks a lot for the post. Editor turned to dark mode but the number line
    I cant find colors under environment setting.

    1. samy

      Editor turned dark but not the number line.*

    2. Sangam

      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.

  24. DM

    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.

    1. Sangam

      I don’t know may be it is loading theme and configurations.

  25. RASOUL

    Thanks a lot Dear Sangam….

  26. Hugo

    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.

    1. Sangam

      Thanks for informing Hugo 😊.

  27. David

    can you please help me find default.conf?

    1. Sangam

      There is a .bat file inside the downloaded archive that will help you to find default.conf.

    2. Punith

      Cool♥️

  28. Fateme

    thanks… its really nice

  29. ali

    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?

  30. Marco

    ¡It works! Thanks.

  31. Hernán Vega

    ¡It works!. Thanks.

  32. KK

    how to turn whole UI into dark?

  33. Sheikh Ariful Islam Rayhan

    MY code block are not setting up the theme, how do I setup now ???

  34. tibike

    “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.

    1. Sangam Shrestha

      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..

  35. themanlie

    very well. thank you

  36. Bolo

    Works perfectly. Linux AntiX 19.3 and CodeBlocks 16.01. Thank you very much, Sangam!

Leave a Reply