Skip to content

Commit

Permalink
fix(color-picker): add missing percent signs (#1831)
Browse files Browse the repository at this point in the history
  • Loading branch information
alenaksu authored Jan 23, 2024
1 parent eb39610 commit 95881b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/color-picker/color-picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ export default class SlColorPicker extends ShoelaceElement implements ShoelaceFo

/** Generates a hex string from HSV values. Hue must be 0-360. All other arguments must be 0-100. */
private getHexString(hue: number, saturation: number, brightness: number, alpha = 100) {
const color = new TinyColor(`hsva(${hue}, ${saturation}, ${brightness}, ${alpha / 100})`);
const color = new TinyColor(`hsva(${hue}, ${saturation}%, ${brightness}%, ${alpha / 100})`);
if (!color.isValid) {
return '';
}
Expand Down

0 comments on commit 95881b8

Please sign in to comment.