In the working code, this line
readline(CYELLOW text_info RESET);
is macro-expanded to
readline("\001\e[0;31m\002" "simple string" "\001\e[0m\002");
which in turn, after string literal combination ends up as
readline("\001\e[0;31m\002simple string\001\e[0m\002");
which contains a simple string literal. No operators are involved, but it still ends up as a single parameter to the function.
In contrast to that, this line
readline(CYELLOW text_info RESET);
is macro-expanded to
readline("\001\e[0;31m\002" text_info "\001\e[0m\002");
which is not subject to string literal combination and therefor ends up with three string expressions (i.e. not exclusively literal strings, one being a non-literal string, a pointer to chars) without any operator in between.
Also, there is no simple operator for string concatenation (cases outside of string literal combination).
So in order to give a single string parameter ("string" as in "C-compatible zero-terminated sequence of chars, maybe array), you will have to construct such a string and then use it as single parameter for the function.
As Weather Vane has proposed, sprintf()
is probably the tool to do that.