Skip to content

Commit fcbc010

Browse files
committed
fix microsoft#98090. hash for float numbers.
1 parent faec90a commit fcbc010

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/vs/editor/contrib/colorPicker/colorDetector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export class ColorDetector extends Disposable implements IEditorContribution {
173173
for (let i = 0; i < colorData.length && decorations.length < MAX_DECORATORS; i++) {
174174
const { red, green, blue, alpha } = colorData[i].colorInfo.color;
175175
const rgba = new RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);
176-
let subKey = hash(rgba).toString(16);
176+
let subKey = hash(`rgba(${rgba.r},${rgba.g},${rgba.b},${rgba.a})`).toString(16);
177177
let color = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;
178178
let key = 'colorBox-' + subKey;
179179

0 commit comments

Comments
 (0)