Skip to content

Commit 9932324

Browse files
authored
Color Picker: fix incorrect ternary condition definition (microsoft#251090)
incorrect ternary condition fix
1 parent acd3bb0 commit 9932324

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ export class DefaultDocumentColorProvider implements DocumentColorProvider {
2727
const alpha = colorFromInfo.alpha;
2828
const color = new Color(new RGBA(Math.round(255 * colorFromInfo.red), Math.round(255 * colorFromInfo.green), Math.round(255 * colorFromInfo.blue), alpha));
2929

30-
const rgb = alpha ? Color.Format.CSS.formatRGB(color) : Color.Format.CSS.formatRGBA(color);
31-
const hsl = alpha ? Color.Format.CSS.formatHSL(color) : Color.Format.CSS.formatHSLA(color);
32-
const hex = alpha ? Color.Format.CSS.formatHex(color) : Color.Format.CSS.formatHexA(color);
30+
const rgb = alpha ? Color.Format.CSS.formatRGBA(color) : Color.Format.CSS.formatRGB(color);
31+
const hsl = alpha ? Color.Format.CSS.formatHSLA(color) : Color.Format.CSS.formatHSL(color);
32+
const hex = alpha ? Color.Format.CSS.formatHexA(color) : Color.Format.CSS.formatHex(color);
3333

3434
const colorPresentations: IColorPresentation[] = [];
3535
colorPresentations.push({ label: rgb, textEdit: { range: range, text: rgb } });

0 commit comments

Comments
 (0)