mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Float Alpha
This commit is contained in:
@@ -1029,14 +1029,14 @@ export class Color {
|
||||
|
||||
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);
|
||||
return new Color(color.r, color.g, color.b, color.a);
|
||||
}
|
||||
|
||||
static fromHex(hex: string): Color | null {
|
||||
let baseColor = BaseColor.Format.CSS.parseHex(hex);
|
||||
if (baseColor) {
|
||||
const rgba = baseColor.rgba;
|
||||
return new Color(rgba.r, rgba.g, rgba.b, rgba.a / 255);
|
||||
return new Color(rgba.r, rgba.g, rgba.b, rgba.a);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user