Color change macro for defined text

Im going to be honest, Ive spent the last two days trying to figure out how to write a macro for this, I have not written any code and have been studying and watching tutorials but im having some problems. I have also entered some macros i have found for this but the do not work when i try to run them.

I can do it via conditional formatting but its time consuming.

the project is pretty simple, I have a current Wiring diagram macro that populates sheet one cells with connector names, pins, size, wire color, ect that are entered on sheet 2.

I would like to add a macro to when I type “red” the text color changes to red or when I type red/blue the text would be red and blue.

Im just trying to help with the visual aspect of the program.

Any help would be greatly appreciated.

Do I understand right - You want typing a value into a cell to trigger a macro, which in turn changes the color of the text you just have put into the cell?
(BTW: Cannot imagine why programming a macro should be faster than a functionality which has been designed for exactly your use case)

yes you are correct, The column that populates with “wire color” If i type “RED” i would like the color of the word “RED” to change to red, If I type Green i want it to change to Green and if I type RED/GREEN I would like the “RED” text to be RED and the “GREEN” text to be GREEN.

STYLE Function

https://help.libreoffice.org/6.3/en-US/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3149425