getColorNames()
Outputs names of colors according to a pattern.
Synopsis
dyn_string getColorNames( [string colpattern] );
Parameters
Parameter | Description |
---|---|
colpattern | search pattern |
Return value
In the event of an error, the function returns an empty string, otherwise, 0.
Error
Missing or incorrect arguments, undefined function, incorrect assignment
Description
Returns all the color names defined in the graphics editor that match the pattern colpattern. Patterns may be specified with the help of the wildcard "*" or "?". "*green" therefore filters all the shades of green that are specified in the form "Bluishgreen", "bluishgreen" and so on. "Red*" filters all the shades of red such as "Reddishbrown". If an empty string has been specified as the pattern or if no pattern has been specified, all the defined colors of the project will be returned.
Example
main()
{
dyn_string getColorNames;
string col;
DebugN(getColorNames("*grey")); // all variants of
grey
}
Assignment
Graphics
Availability
UI