fun TypedArray.getColorOrThrow(@StyleableRes index: Int): Int
Retrieve the color value for the attribute at index or throws IllegalArgumentException if not defined.
See Also
TypedArray.hasValue
TypedArray.getColor