Is there a standard to interpret the syntax of function interfaces in API documentations and if yes, how is it defined?
Here is an example on how to change the color
API docs for dynamically typed languages can be not very meaningful if not written carefully, so do not feel too bad about it, even the most seasoned developer can have a hard time trying to understand them.
About brackets and such, there is usually a code conventions section that should explain the exact usage outside literal examples; although EBNF, Regex and Railroad Diagrams are almost ubiquitous, so you should be familiar with them to understand most notations.