feat:add Color.alpha

This commit is contained in:
pengfei.zhou
2019-11-29 13:10:00 +08:00
parent 30c913f640
commit ed7e071a01
2 changed files with 12 additions and 2 deletions

View File

@@ -62,6 +62,10 @@ export class Color implements Modeling {
}
}
alpha(v: number) {
return new Color((this._value & 0xffffff) | ((v & 0xff) << 24))
}
toModel() {
return this._value
}