Keywords in arduino IDE

I cannot succeed in coloring some keyword in green. Only blue, orange and bold orange colors are available for all NAMES (meaning KEYWORD1, KEYWORD2, etc).

My keywords.txt file is in my libraries under my library folder. The theme.txt file is this: and was modified as I saw on this forum

#FUNCTIONS COLOR 			#D35400 - ORANGE			KEYWORD1
#FUNCTIONS COLOR			#D35400 - ORANGE			KEYWORD2
#STRUCTURE COLORS 			#728E00 - GREEN			KEYWORD3
#CONSTANTS COLOR 				#00979C - BLUE				LITERAL1
#VARIABLES COLOR 				#00979C - BLUE				LITERAL2

#ERROR COLOR					#A61717 - RED
#COMMENTS // COLOR			#95A5A6 - LIGHT GREY
#COMMENTS /**/ COLOR		#434F54	- DARK GREY

# GUI - STATUS
status.notice.fgcolor = #002325
status.notice.bgcolor = #17A1A5
status.error.fgcolor = #FFFFFF
status.error.bgcolor = #E34C00
status.edit.fgcolor = #000000
status.edit.bgcolor = #F1B500
status.font = SansSerif,plain,12

# GUI - TABS
# (tab images are stored in the lib/theme folder)
header.bgcolor = #17A1A5
header.text.selected.color = #005B5B
header.text.unselected.color = #007e82
header.text.font = SansSerif,plain,12

# GUI - CONSOLE
console.font = Monospaced,plain,11
console.font.macosx = Monaco,plain,10
console.color = #000000
console.output.color = #eeeeee
console.error.color = #E34C00

# GUI - BUTTONS
buttons.bgcolor = #006468
buttons.status.font = SansSerif,plain,12
buttons.status.color = #ffffff

# GUI - PLOTTING
plotting.bgcolor = #ffffff
plotting.color = #ffffff
plotting.gridcolor = #f0f0f0
plotting.boundscolor = #000000
plotting.graphcolor.size = 8
plotting.graphcolor.00 = #0000FF
plotting.graphcolor.01 = #FF0000
plotting.graphcolor.02 = #009900
plotting.graphcolor.03 = #FF9900
plotting.graphcolor.04 = #CC00CC
plotting.graphcolor.05 = #666666
plotting.graphcolor.06 = #00CCFF
plotting.graphcolor.07 = #000000

# GUI - LINESTATUS   
linestatus.color = #ffffff
linestatus.bgcolor = #006468

# EDITOR - DETAILS

# foreground and background colors
editor.fgcolor = #000000
editor.bgcolor = #ffffff

# highlight for the current line
editor.linehighlight.color=#e2e2e2
# highlight for the current line
editor.linehighlight=false

# caret blinking and caret color
editor.caret.color = #333300

# color to be used for background when 'external editor' enabled
editor.external.bgcolor = #c8d2dc

# selection color
editor.selection.color = #ffcc00

# area that's not in use by the text (replaced with tildes)
editor.invalid.style = #7e7e7e,bold

# little pooties at the end of lines that show where they finish
editor.eolmarkers = false
editor.eolmarkers.color = #999999

# bracket/brace highlighting
editor.brackethighlight = true
editor.brackethighlight.color = #006699


# TEXT - KEYWORDS

# FUNCTIONS
editor.keyword1.style = #d35400,bold
editor.data_type.style = #d35400,bold

# METHODS
editor.keyword2.style = #D35400,plain
editor.function.style = #d35400,plain

# STRUCTURES
editor.keyword3.style = #5E6D03,plain
editor.reserved_word.style = #5E6D03,plain


# TEXT - LITERALS
editor.literal1.style = #00979C,plain
editor.literal2.style = #00979C,plain
editor.variable.style = #00979C,plain
editor.reserved_word_2.style = #00979C,plain
editor.literal_boolean.style = #00979C,plain
editor.literal_char.style = #00979C,plain
editor.literal_string_double_quote.style = #005C5F,plain
editor.preprocessor.style = #5E6D03,plain

# http://www.arduino.cc/
editor.url.style = #0000ff,underlined

# e.g. + - = /
editor.operator.style = #434f54,plain


# ?? maybe this is for words followed by a colon
# like in case statements or goto
editor.label.style = #7e7e7e,bold


# TEXT - COMMENTS
editor.comment1.style = #434F54,plain
editor.comment2.style = #95a5a6,plain


# LINE STATUS - editor line number status bar at the bottom of the screen
linestatus.font	   = SansSerif,plain,10
linestatus.height  = 20

Here is everything I know about the Arduino IDE's theme system:
https://github.com/per1234/ThemeTest#readme

And the instructions for the new theme installation options that were added to the Arduino IDE since the time I wrote the documentation above:
https://forum.arduino.cc/t/where-is-the-theme-directory/505795/9#msg4678818

Make sure to also check the documentation for keywords.txt:
https://arduino.github.io/arduino-cli/latest/library-specification/#keywordstxt-format

I just noticed this is in the Arduino IDE 2.0 beta forum category. Are you using Arduino IDE 2.0.0? If so, it doesn't currently have any support for keywords.txt and has a completely different theme system from the classic IDE.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.