提交 c87e0d76 编写于 作者: J Joao Moreno

fix css color formats

上级 4c21fd58
......@@ -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})'
}
};
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册