If you have ever requested a color property through the Matlab COM interface, you get something like the following:
STK sends a hex value though the COM interface, then Matlab converts it to a decimal value. The final value shown above seems to also flip the red and blue value so instead of RGB its actually BGR. Attached are two functions that convert the value from a color property to a vector of RGB and a function to compute the reverse. These are located in the StkColorFunctions.m Matlab file.
Afterwards when using the function, you get the following:

Also attached is a helper function to find the STK color code for a desired color, FindStkColorCode.m. It requires online access and uses the RGB Color Codes Chart on the RapidTables website. The function launches The RGB Color Code Chart webpage, then prompts the user to enter the chosen color's hex code. The function then returns the corresponding STK color code. This function can be used to:
- Obtain the STK color code for a desired color, or
- Change the color properties of an STK object. Examples are provided in the comment section of the function file.