API Reference > imodeljs-common > Symbology > ColorDef > computeTbgrFromString computeTbgrFromString MethodStatic Compute the 0xTTBBGGRR value corresponding to a string representation of a color. If val is not a valid color string, this function returns 0 (black). computeTbgrFromString(val: string): number see ColorDef.fromString for the definition of a valid color string. see ColorDef.tryComputeTbgrFromString to determine if val is a valid color string. Parameter Type Description val string Returns - number Defined in core/common/src/ColorDef.ts Line 149 Last Updated: 12 June, 2024