mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Span colors fixed to accept known colors
This commit is contained in:
@@ -49,8 +49,8 @@ export class Span extends bindable.Bindable implements definition.Span, view.App
|
||||
|
||||
private _getColorValue(value: any): colorModule.Color {
|
||||
var result;
|
||||
if (types.isString(value) && (<any>value).indexOf("#") === 0) {
|
||||
result = new colorModule.Color(<any>value);
|
||||
if (types.isString(value) && colorModule.Color.isValid(value)) {
|
||||
result = new colorModule.Color(value);
|
||||
}
|
||||
else {
|
||||
result = value;
|
||||
|
||||
Reference in New Issue
Block a user