API Reference > imodeljs-common > Symbology > ColorDef > isValidColor isValidColor MethodStatic Determine whether the input is a valid representation of a ColorDef. isValidColor(val: string | number): boolean see ColorDef.fromString for the definition of a valid string representation. see ColorDefProps for the definition of a valid numeric representation. Parameter Type Description val string | number Returns - boolean Defined in core/common/src/ColorDef.ts Line 137 Last Updated: 12 June, 2024