Align signatures with other providers.

This commit is contained in:
rebornix
2017-09-08 14:11:44 -07:00
parent f0ecb26ace
commit 3753e0e1d2
8 changed files with 11 additions and 11 deletions

View File

@@ -70,13 +70,13 @@ export function activate(context: ExtensionContext) {
});
});
},
resolveColor(color: Color, colorFormat: ColorFormat): Thenable<string> | string {
resolveDocumentColor(color: Color, colorFormat: ColorFormat): Thenable<string> | string {
switch (colorFormat) {
case ColorFormat.RGB:
if (color.alpha === 1) {
return `rgb(${Math.round(color.red * 255)}, ${Math.round(color.green * 255)}, ${Math.round(color.blue * 255)})`;
} else {
return `rgb(${Math.round(color.red * 255)}, ${Math.round(color.green * 255)}, ${Math.round(color.blue * 255)}, ${color.alpha})`;
return `rgba(${Math.round(color.red * 255)}, ${Math.round(color.green * 255)}, ${Math.round(color.blue * 255)}, ${color.alpha})`;
}
case ColorFormat.HEX:
if (color.alpha === 1) {