diff --git a/extensions/css/client/src/colorDecorators.ts b/extensions/css/client/src/colorDecorators.ts index 60c8cf239c8..e7b0e0cb680 100644 --- a/extensions/css/client/src/colorDecorators.ts +++ b/extensions/css/client/src/colorDecorators.ts @@ -135,12 +135,12 @@ export function activateColorDecorations(decoratorProvider: (uri: string) => The const CSSColorFormats = { Hex: '#{red:X}{green:X}{blue:X}', RGB: { - opaque: 'rgb({red}, {green}, {blue})', - transparent: 'rgba({red}, {green}, {blue}, {alpha:2f[0-1]})' + opaque: 'rgb({red:d[0-255]}, {green:d[0-255]}, {blue:d[0-255]})', + transparent: 'rgba({red:d[0-255]}, {green:d[0-255]}, {blue:d[0-255]}, {alpha})' }, HSL: { opaque: 'hsl({hue:d[0-360]}, {saturation:d[0-100]}%, {luminance:d[0-100]}%)', - transparent: 'hsla({hue:d[0-360]}, {saturation:d[0-100]}%, {luminance:d[0-100]}%, {alpha:2f[0-1]})' + transparent: 'hsla({hue:d[0-360]}, {saturation:d[0-100]}%, {luminance:d[0-100]}%, {alpha})' } }; diff --git a/src/vs/editor/contrib/colorPicker/common/colorFormatter.ts b/src/vs/editor/contrib/colorPicker/common/colorFormatter.ts index 0d5f5521fbb..6e007d3d2be 100644 --- a/src/vs/editor/contrib/colorPicker/common/colorFormatter.ts +++ b/src/vs/editor/contrib/colorPicker/common/colorFormatter.ts @@ -60,8 +60,6 @@ function createPropertyNode(variable: string, fractionDigits: number, type: stri min = typeof min === 'number' ? min : 0; max = typeof max === 'number' ? max : 255; - console.log(value, min, max); - let result = normalize(value, min, max).toString(16); if (type === 'X') { @@ -84,7 +82,7 @@ export interface IColorFormatter { export class ColorFormatter implements IColorFormatter { - readonly supportsTransparency: boolean; + readonly supportsTransparency: boolean = false; private tree: Node[] = []; // Group 0: variable