|Description:||Converts a color name into an RGB array.|
Naming follows the W3C standard.
|Syntax:||[name, alpha] call fn_vbs_colorByName|
|Return Value:||Color - [R,G,B,A] (if no color is found, [0,0,0,1] is returned).|
When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.
["yellow"] call fn_vbs_colorByName; // Returns: [1,1,0,1]
["brown",0.5] call fn_vbs_colorByName; // Returns: [0.647,0.164,0.164,0.5]