Span colors fixed to accept known colors

This commit is contained in:
Vladimir Enchev
2016-01-11 13:10:55 +02:00
parent 3713097c5f
commit 6df15daafc
2 changed files with 21 additions and 2 deletions

View File

@@ -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;