It's because it's the name of one of the four process colours (Cyan, Magenta, Yellow and Black in English). You have to either name it with the colour value, or choose another name. I often name yellows with a bit of magenta 'Gold'.
It's a longstanding annoyance, and I'm not aware of any justification for prohibiting the use of those names for process colours. Spot colours would be a different matter.
What an odd prohibition! Thanks for clearing that up for me, though - I was going nuts hehe
You could probably use Gui 1 or My Gui or similar trick.
InDesign reserves certain color names so that those colors can always be accessed. In particular, None and the CMYK Cyan, Magenta, Yellow and Black and their translations into other languages like Jaune, Gelb, or Geel.
These colors can always be accessed by scripting even though the swatches don't exist.
When you can change the capitalization of the names so that yellow or YELLOW of gul or GUL will work as these are not reserved names.
You can use YELLOW or I aasume GUL.
I had the same question. I found that it works to use "Yellow " with a space after it. It's unnoticeable.