diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index cc6ac5c91a797e23bf55f213e9e9aaeef43e7aa3..0c578ad3ddba6281e9fed9c7a18637f24312515b 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -7,7 +7,7 @@ import * as crypto from 'crypto'; import URI from 'vs/base/common/uri'; -import { Color as CommonColor, HSLA } from 'vs/base/common/color'; +import { Color as BaseColor, HSLA } from 'vs/base/common/color'; import { illegalArgument } from 'vs/base/common/errors'; import * as vscode from 'vscode'; @@ -1020,23 +1020,20 @@ export class Color { readonly blue: number; readonly alpha: number; - constructor(red: number, green: number, blue: number, alpha?: number) { + constructor(red: number, green: number, blue: number, alpha: number) { this.red = red; this.green = green; this.blue = blue; this.alpha = alpha; } - static fromHSLA(hue: number, saturation: number, luminosity: number, alpha?: number): Color { - if (!alpha) { - alpha = 1; - } - const color = new CommonColor(new HSLA(hue, saturation, luminosity, alpha)).rgba; + static fromHSLA(hue: number, saturation: number, luminance: number, alpha: number): Color { + const color = new BaseColor(new HSLA(hue, saturation, luminance, alpha)).rgba; return new Color(color.r, color.g, color.b, color.a / 255); } static fromHex(hex: string): Color { - const color = CommonColor.fromHex(hex).rgba; + const color = BaseColor.fromHex(hex).rgba; return new Color(color.r, color.g, color.b, color.a / 255); } }