color space 0...1

This commit is contained in:
rebornix
2017-09-20 12:59:02 -07:00
parent e129b2c7df
commit ce20acd130
4 changed files with 6 additions and 6 deletions

View File

@@ -127,7 +127,7 @@ export function activate(context: ExtensionContext) {
return client.sendRequest(DocumentColorRequest.type, params).then(symbols => {
return symbols.map(symbol => {
let range = client.protocol2CodeConverter.asRange(symbol.range);
let color = new Color(symbol.color.red * 255, symbol.color.green * 255, symbol.color.blue * 255, symbol.color.alpha);
let color = new Color(symbol.color.red, symbol.color.green, symbol.color.blue, symbol.color.alpha);
return new ColorInformation(range, color);
});
});