Keil uVision 5 ships with a default light color scheme that can cause eye strain during extended coding sessions. This guide covers three distinct dark theme configurations that can be applied by modifying the global.prop file.
Locating the Configuration File
The theme settings are stored in a file called global.prop located in your Keil installation directory. If this file doesn't exist, create it manuallly. All three theme configurations below can be copied direct into this file.
Theme Option 1: VS Code-Inspired Dark Theme
This configuration mirrors the popular VS Code dark theme aesthetic with muted tones and excellent readability. The background uses a dark gray (#1E1E1E) with carefully selected syntax highlighting colors.
# Global editor settings
indent.automatic=1
virtual.space=0
view.whitespace=0
view.endofline=0
code.page=936
caretline.visible=1
highlight.matchingbraces=1
print.syntax.coloring=1
use.tab.color=1
create.backup.files=0
auto.load.ext.modfiles=0
save.prj.before.dbg=0
save.files.before.dbg=0
function.scanner.project=1
function.scanner.files=1
function.scanner.modules=1
# C/C++ specific settings
syntax.colouring.cpp=1
use.tab.cpp=0
tabsize.cpp=4
line.margin.visible.cpp=1
fold.cpp=1
monospaced.font.cpp=1
# Assembly file settings
syntax.colouring.asm=1
use.tab.asm=0
tabsize.asm=4
line.margin.visible.asm=1
monospaced.font.asm=1
# General text file settings
use.tabs=0
tabsize=4
line.margin.visible.txt=0
monospaced.font.txt=1
# Code completion configuration
cc.autolist=1
cc.highlightsyntax=1
cc.showparameters=1
cc.triggerlist=1
cc.triggernumchars=3
cc.enter.as.fillup=0
cc.usealpha4inactcode=1
cc.alphavalue=50
# Auto-save settings
autosave=0
autosave.interval=5
# Right margin configuration
edge.mode=0
edge.column=80
# Text selection colors
selection.fore=#000000
selection.back=#005EB3
caret.fore=#FFFFFF
caret.back=#000000
edge.colour=#66FAFA
# C/C++ code templates
template.cpp="#define","#define |";"#if","#if |\r\n\r\n#endif";\
"#include","#include ";"Header","// Header:\r\n// File Name: |\r\n// Author:\r\n// Date:\r\n";\
"continue","continue;";"do","do\r\n{\r\n\t// TODO: enter the block content here\r\n\t\r\n\t|\r\n} while ();\r\n";\
"enum","enum |\r\n{\r\n\t\r\n};\r\n";"for","for(|;;)\r\n{\r\n}";\
"fpointer_type","typedef int (* |F)();\r\n";"function","void function(|)\r\n{\r\n\r\n}\r\n";\
"if","if (|)";"ifelse","if (|)\r\n{\r\n}\r\nelse\r\n{\r\n}";\
"struct","struct | \r\n{\r\n\r\n};\r\n";"switch","switch (|)\r\n{\r\n\tcase:\r\n\t\tbreak;\r\n\tcase:\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n}";\
"void","void | ();\r\n";"while","while (|)\r\n{\r\n}";\
font.monospace.cpp=Fixedsys
font.acpmonofontname.cpp=Fixedsys
font.acppropfontname.cpp=Fixedsys
# Syntax highlighting for C++ - identifiers
style.cpp.32=font:Fixedsys,size:14,fore:#9CDCFE,back:#1E1E1E
# Syntax highlighting for C++ - keywords
style.cpp.4=font:Fixedsys,size:14,fore:#4EC9B0,back:#1E1E1E
# Syntax highlighting for C++ - comments
style.cpp.10=font:Fixedsys,size:14,fore:#DCDCDC,back:#1E1E1E
# Syntax highlighting for C++ - strings
style.cpp.1=font:Fixedsys,size:14,fore:#57A64A,back:#1E1E1E
# Syntax highlighting for C++ - numbers
style.cpp.2=font:Fixedsys,size:14,fore:#007F00,back:#1E1E1E
# Syntax highlighting for C++ - types
style.cpp.5=font:Fixedsys,size:14,fore:#007ACC,back:#1E1E1E
# Syntax highlighting for C++ - operators
style.cpp.6=font:Fixedsys,size:14,fore:#FF80FF,back:#1E1E1E
# Syntax highlighting for C++ - plain text
style.cpp.11=font:Fixedsys,size:14,fore:#DCDCDC,back:#1E1E1E
# Syntax highlighting for C++ - functions
style.cpp.9=font:Fixedsys,size:14,fore:#4EC9B0,back:#1E1E1E
# Syntax highlighting for C++ - variables
style.cpp.7=font:Fixedsys,size:14,fore:#FF80FF,back:#1E1E1E
# Syntax highlighting for C++ - selection highlight
style.cpp.34=font:Fixedsys,size:14,fore:#500000,back:#007ACC
# Syntax highlighting for C++ - errors
style.cpp.35=font:Fixedsys,size:14,fore:#FF0000,back:#1E1E1E
# Syntax highlighting for C++ - preprocessor
style.cpp.16=font:Fixedsys,size:14,fore:#9CDCFE,back:#1E1E1E
# Syntax highlighting for C++ - inline comments
style.cpp.12=font:Fixedsys,size:14,fore:#FF80FF,back:#1E1E1E
# Syntax highlighting for C++ - inactive code
style.cpp.86=font:Fixedsys,size:14,fore:#696969,back:#FFFFFF
# Assembly syntax highlighting
font.monospace.asm=Courier New
style.asm.32=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.1=font:Courier New,size:10,fore:#616161,back:#FFFFFF
style.asm.2=font:Courier New,size:10,fore:#FF0000,back:#FFFFFF
style.asm.3=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF
style.asm.4=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.5=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.6=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.7=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.9=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.10=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.11=font:Courier New,size:10,fore:#007F00,back:#FFFFFF
style.asm.12=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF
style.asm.8=font:Courier New,size:10,fore:#46AA03,back:#FFFFFF
# Plain text file highlighting
font.monospace.txt=Consolas
style.txt.32=font:Verdana,size:10,fore:#000000,back:#FFFFFF
Theme Option 2: High Contrast Dark Theme
This configuration uses vibrant, saturated colors against a dark background (#2F2F2F). The higher contrast makes different language elements distinctly visible, which some developers prefer for rapid code comprehension.
# Global editor settings
indent.automatic=1
virtual.space=0
view.whitespace=0
view.endofline=0
code.page=0
caretline.visible=0
highlight.matchingbraces=1
print.syntax.coloring=1
use.tab.color=1
create.backup.files=0
auto.load.ext.modfiles=0
save.prj.before.dbg=0
save.files.before.dbg=0
function.scanner.project=1
function.scanner.files=1
function.scanner.modules=1
# C/C++ specific settings
syntax.colouring.cpp=1
use.tab.cpp=0
tabsize.cpp=2
line.margin.visible.cpp=1
fold.cpp=1
monospaced.font.cpp=1
# Assembly file settings
syntax.colouring.asm=1
use.tab.asm=0
tabsize.asm=4
line.margin.visible.asm=1
monospaced.font.asm=1
# General text file settings
use.tabs=0
tabsize=4
line.margin.visible.txt=0
monospaced.font.txt=1
# Code completion configuration
cc.autolist=1
cc.highlightsyntax=1
cc.showparameters=1
cc.triggerlist=0
cc.triggernumchars=3
# Auto-save settings
autosave=0
autosave.interval=5
# Text selection colors
selection.fore=#FFFFFF
selection.back=#FF8000
caret.fore=#00FF00
caret.back=#3E3E3E
# C/C++ code templates
template.cpp="#define","#define |";"#if","#if |\r\n\r\n#endif";\
"#include","#include ";"Header","// Header:\r\n// File Name: |\r\n// Author:\r\n// Date:\r\n";\
"continue","continue;";"do","do\r\n{\r\n\t// TODO: enter the block content here\r\n\t\r\n\t|\r\n} while ();\r\n";\
"enum","enum |\r\n{\r\n\t\r\n};\r\n";"for","for(|;;)\r\n{\r\n}";\
"fpointer_type","typedef int (* |F)();\r\n";"function","void function(|)\r\n{\r\n\r\n}\r\n";\
"if","if (|)";"ifelse","if (|)\r\n{\r\n}\r\nelse\r\n{\r\n}";\
"struct","struct | \r\n{\r\n\r\n};\r\n";"switch","switch (|)\r\n{\r\n\tcase:\r\n\t\tbreak;\r\n\tcase:\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n}";\
"void","void | ();\r\n";"while","while (|)\r\n{\r\n}";\
font.monospace.cpp=Consolas
# Syntax highlighting for C++ - identifiers
style.cpp.32=font:Consolas,size:12,fore:#FFFFFF,back:#2F2F2F
# Syntax highlighting for C++ - keywords
style.cpp.4=font:Consolas,size:12,fore:#FF0080,back:#2F2F2F
# Syntax highlighting for C++ - comments
style.cpp.10=font:Consolas,size:12,fore:#808000,back:#2F2F2F
# Syntax highlighting for C++ - strings
style.cpp.1=font:Consolas,size:12,fore:#8080FF,back:#2F2F2F
# Syntax highlighting for C++ - numbers
style.cpp.2=font:Consolas,size:12,fore:#FF80FF,back:#2F2F2F
# Syntax highlighting for C++ - types
style.cpp.5=font:Consolas,size:12,fore:#14B4FF,back:#2F2F2F,italics
# Syntax highlighting for C++ - operators
style.cpp.6=font:Consolas,size:12,fore:#80FF80,back:#2F2F2F
# Syntax highlighting for C++ - plain text
style.cpp.11=font:Consolas,size:12,fore:#FFFFFF,back:#2F2F2F
# Syntax highlighting for C++ - functions
style.cpp.9=font:Consolas,size:12,fore:#FF8080,back:#2F2F2F
# Syntax highlighting for C++ - variables
style.cpp.7=font:Consolas,size:12,fore:#FF8000,back:#2F2F2F
# Syntax highlighting for C++ - selection highlight
style.cpp.34=font:Consolas,size:12,fore:#500000,back:#20FFFF
# Syntax highlighting for C++ - errors
style.cpp.35=font:Consolas,size:12,fore:#FF0000,back:#FFFFFF
# Syntax highlighting for C++ - preprocessor
style.cpp.16=font:Consolas,size:12,fore:#B00040,back:#FFFFFF
# Syntax highlighting for C++ - inline comments
style.cpp.12=font:Consolas,size:12,fore:#000000,back:#E0C0E0
# Assembly syntax highlighting
font.monospace.asm=Courier New
style.asm.32=font:Courier New,size:10,fore:#FFFFFF,back:#2F2F2F
style.asm.1=font:Courier New,size:10,fore:#808040,back:#2F2F2F
style.asm.2=font:Courier New,size:10,fore:#FF80FF,back:#2F2F2F
style.asm.3=font:Courier New,size:10,fore:#FF8040,back:#2F2F2F
style.asm.4=font:Courier New,size:10,fore:#FFFFFF,back:#2F2F2F
style.asm.5=font:Courier New,size:10,fore:#FFFFFF,back:#2F2F2F
style.asm.6=font:Courier New,size:10,fore:#FFFF80,back:#2F2F2F
style.asm.7=font:Courier New,size:10,fore:#FFFF80,back:#2F2F2F
style.asm.9=font:Courier New,size:10,fore:#80FFFF,back:#2F2F2F
style.asm.10=font:Courier New,size:10,fore:#80FFFF,back:#2F2F2F
style.asm.11=font:Courier New,size:10,fore:#007F00,back:#2F2F2F
style.asm.12=font:Courier New,size:10,fore:#FF80FF,back:#2F2F2F
style.asm.8=font:Courier New,size:10,fore:#46AA03,back:#2F2F2F
# Plain text file highlighting
font.monospace.txt=Courier New
style.txt.32=font:Verdana,size:10,fore:#FFFFFF,back:#2F2F2F
Theme Option 3: Modern Dark Theme
This configuration balances aesthetics with functionality using a deeper black background (#151515). The color palette emphasizes readability while providing clear visual distinction between different syntax elements.
# Global editor settings
indent.automatic=1
virtual.space=0
view.whitespace=0
view.endofline=0
code.page=936
caretline.visible=1
highlight.matchingbraces=1
print.syntax.coloring=1
use.tab.color=1
create.backup.files=0
auto.load.ext.modfiles=0
save.prj.before.dbg=1
save.files.before.dbg=1
function.scanner.project=1
function.scanner.files=1
function.scanner.modules=1
# C/C++ specific settings
syntax.colouring.cpp=1
use.tab.cpp=0
tabsize.cpp=2
line.margin.visible.cpp=1
fold.cpp=1
monospaced.font.cpp=1
# Assembly file settings
syntax.colouring.asm=1
use.tab.asm=0
tabsize.asm=4
line.margin.visible.asm=1
monospaced.font.asm=1
# General text file settings
use.tabs=0
tabsize=4
line.margin.visible.txt=1
monospaced.font.txt=1
# Code completion configuration
cc.autolist=1
cc.highlightsyntax=1
cc.showparameters=1
cc.triggerlist=1
cc.triggernumchars=3
cc.enter.as.fillup=0
cc.usealpha4inactcode=1
cc.alphavalue=50
# Auto-save settings
autosave=1
autosave.interval=5
# Right margin configuration
edge.mode=0
edge.column=80
# Text selection colors
selection.fore=#D4D4D4
selection.back=#3F3F3F
caret.fore=#FFFFFF
caret.back=#2A2A2A
edge.colour=#66FAFA
# C/C++ code templates
template.cpp="#define","#define |";"#if","#if |\r\n\r\n#endif";\
"#include","#include <|>";"Header","// Header:\r\n// File Name: |\r\n// Author:\r\n// Date:\r\n";\
"continue","continue;";"do","do\r\n{\r\n\t// TODO: enter the block content here\r\n\t\r\n\t|\r\n} while ();\r\n";\
"enum","enum |\r\n{\r\n\t\r\n};\r\n";"for","for(|;;)\r\n{\r\n}";\
"fpointer_type","typedef int (* |F)();\r\n";"function","void function(|)\r\n{\r\n\r\n}\r\n";\
"if","if (|)";"ifelse","if (|)\r\n{\r\n}\r\nelse\r\n{\r\n}";\
"struct","struct | \r\n{\r\n\r\n};\r\n";"switch","switch (|)\r\n{\r\n\tcase:\r\n\t\tbreak;\r\n\tcase:\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n}";\
"void","void | ();\r\n";"while","while (|)\r\n{\r\n}";\
font.monospace.cpp=Courier New
# Syntax highlighting for C++ - identifiers
style.cpp.32=font:Courier New,size:10,fore:#4F4F4F,back:#151515
# Syntax highlighting for C++ - keywords
style.cpp.4=font:Courier New,size:10,fore:#00D59F,back:#151515
# Syntax highlighting for C++ - comments
style.cpp.10=font:Courier New,size:10,fore:#6A6A6A,back:#151515
# Syntax highlighting for C++ - strings
style.cpp.1=font:Courier New,size:10,fore:#00954A,back:#151515
# Syntax highlighting for C++ - numbers
style.cpp.2=font:Courier New,size:10,fore:#00954A,back:#151515
# Syntax highlighting for C++ - types
style.cpp.5=font:Courier New,size:10,fore:#FF8000,back:#151515
# Syntax highlighting for C++ - operators
style.cpp.6=font:Courier New,size:10,fore:#FF8080,back:#151515
# Syntax highlighting for C++ - plain text
style.cpp.11=font:Courier New,size:10,fore:#00A5F4,back:#151515
# Syntax highlighting for C++ - functions
style.cpp.9=font:Courier New,size:10,fore:#D5D500,back:#151515
# Syntax highlighting for C++ - variables
style.cpp.7=font:Courier New,size:10,fore:#FF8080,back:#151515
# Syntax highlighting for C++ - selection highlight
style.cpp.34=font:Courier New,size:10,fore:#FFFF00,back:#3A3A3A
# Syntax highlighting for C++ - errors
style.cpp.35=font:Courier New,size:10,fore:#FF0000,back:#151515
# Syntax highlighting for C++ - preprocessor
style.cpp.16=font:Courier New,size:10,fore:#FF55AA,back:#151515
# Syntax highlighting for C++ - inline comments
style.cpp.12=font:Courier New,size:10,fore:#E3C6E3,back:#151515
# Syntax highlighting for C++ - inactive code
style.cpp.86=font:Courier New,size:10,fore:#FFFFFF,back:#151515
# Assembly syntax highlighting
font.monospace.asm=Courier New
style.asm.32=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.1=font:Courier New,size:10,fore:#616161,back:#FFFFFF
style.asm.2=font:Courier New,size:10,fore:#FF0000,back:#FFFFFF
style.asm.3=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF
style.asm.4=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.5=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.6=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.7=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.9=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.10=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.11=font:Courier New,size:10,fore:#007F00,back:#FFFFFF
style.asm.12=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF
style.asm.8=font:Courier New,size:10,fore:#46AA03,back:#FFFFFF
# Plain text file highlighting
font.monospace.txt=Consolas
style.txt.32=font:Verdana,size:10,fore:#FFFFFF,back:#151515
Applying the Theme
After adding your preferred configuration to global.prop, restart Keil uVision for the changes to take effect. The IDE will apply the syntax highlighting and color scheme immediately upon relaunch.