CodeBlocks最全官方配色方案

本文介绍了如何在CodeBlocks中设置官方提供的多种配色方案,以减轻长时间编程对眼睛的伤害。详细步骤包括从官方获取配色代码,保存为default.conf文件,并替换原有文件,确保备份原文件,最后在CodeBlocks中看到配色效果。
摘要由CSDN通过智能技术生成
                       

官方配色


codeblocks是一个功能很强大编程软件,我们在安装codeblocks后软件默认的是白底黑字界面,这种界面在长时间写代码时会对眼睛造成很大伤害,增加眼疲劳,因此我们需要一个清晰干净明了,不刺眼的编程界面。下面教我们如何配置一个养眼的编程界面。

 

官方地址 Syntax highlighting custom colour themes

有几种经典方案,包括vim, desert, sublime, ulipad, oblivion, darkgray

使用方法


首先进入codeblocks官网找到colour theme代码,链接如下 Syntax highlighting custom colour themes

将配色方案的代码,保存为default.conf

在C盘中找到CodeBlocks/default.conf,注意default.conf文件不再你的安装文件夹下,而是在系统盘下,以win7系统为例。
C:\Users\yourusername\AppData\Roaming\CodeBlocks 目下下的default.conf

然后用我们从官网上弄来的配色方案替换default.conf

 

注意

   

原来的配色文件一定要备份好,要不弄崩了,就只能重装CB了。

打开CodeBlocks建立新的c/c++文件就会发现背景变化,同时也可以在编辑环境设置中看到我们配色文件中的其他配色方案。
如果想要改变其他风格可以在Settings>Editor>Syntax Highlightingcolour theme中选择你想要的风格,你也可以自定义各种颜色。

这里写图片描述

default.conf


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><CodeBlocksConfig version="1">    <editor>        <colour_sets>            <ACTIVE_COLOUR_SET>                <str>                    <![CDATA[modnokai night shift v2]]>                </str>            </ACTIVE_COLOUR_SET>            <ACTIVE_LANG>                <str>                    <![CDATA[C/C++]]>                </str>            </ACTIVE_LANG>            <bright_yellow>                <NAME>                    <str>                        <![CDATA[bright yellow]]>                    </str>                </NAME>                <cc>                    <style0>                        <BACK>                            <colour r="255" g="255" b="208" />                        </BACK>                        <NAME>                            <str>                                <![CDATA[Default]]>                            </str>                        </NAME>                    </style0>                    <style1>                        <BACK>                            <colour r="255" g="255" b="208" />                        </BACK>                        <NAME>                            <str>                                <![CDATA[Default]]>                            </str>                        </NAME>                    </style1>                    <style5>                        <FORE>                            <colour r="158" g="158" b="158" />                        </FORE>                        <NAME>                            <str>                                <![CDATA[Comment (normal)]]>                            </str>                        </NAME>                    </style5>                    <style6>                        <FORE>                            <colour r="158" g="158" b="158" />                        </FORE>                        <NAME>                            <str>                                <![CDATA[Comment (normal)]]>                            </str>                        </NAME>                    </style6>                    <style7>                        <FORE>                            <colour r="158" g="158" b="158" />                        </FORE>                        <NAME>                            <str>                                <![CDATA[Comment (normal)]]>                            </str>                        </NAME>                    </style7>                    <style8>                        <FORE>                            <colour r="158" g="158" b="158" />                        </FORE>                        <NAME>                            <str>                                <![CDATA[Comment (normal)]]>                            </str>                        </NAME>                    </style8>                    <style9>                        <FORE>                            <colour r="128" g="128" b="128" />                        </FORE>                        <NAME>                            <str>                                <![CDATA[Comment line (normal)]]>                            </str>                        </NAME>                    </style9>                    <style10>                        <FORE>                            <colour r="128" g="128" b="128" />                        </FORE>                        <NAME>                            <str>                                <![CDATA[Comment line (normal)]]>                            </str>                        </NAME>                    </style10>                    <style11>                        <FORE>                            <colour r="128" g="128" b="218" />                        </FORE>                        <BOLD bool="0" />                        <NAME>                            <str>                                <![CDATA[Comment (documentation)]]>                            </str>                        </NAME>                    </style11>                    <style12>                        <FORE>                            <colour r="128" g="128" b="218" />                        </FORE>                        <BOLD bool="0" />                        <NAME>                            <str>                                <![CDATA[Comment (documentation)]]>                            </str>                        </NAME>                    </style12>                    <style13>                        <BOLD bool="0" />                        <NAME>                            <str>                                <![CDATA[Comment line (documentation)]]>                            </str>                        </NAME>                    </style13>                    <style14>                        <BOLD bool="0" />                        <NAME>                            <str>                                <![CDATA[Comment line (documentation)]]>                            </str>                        </NAME>                    </style14>                    <style21>                        <BOLD bool="0" />                        <NAME>                            <str>                                <![CDATA[Keyword]]>                            </str>                        </NAME>                    </style21>                    <style23>                        <BOLD bool="0" />                        <NAME>                            <str>                                <![CDATA[User keyword]]>                            </str>                        </NAME
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值