-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
Environment
Vuetify Version: 3.11.8
Vue Version: 3.5.27
OS: macOS 10.15.7 (current)
Steps to reproduce
- Create a VColorPicker (or VColorInput which creates a VColorPicker)
- Set its value to a rgb string, for example
rgb(102, 187, 106) - Click on a swatch color or in the gradient to select another color
Expected Behavior
It should set a valid css value
Actual Behavior
It applies a broken value like rgb(233 30 99 / undefined)
Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
The color picker is fine when working with hex values.
The issue only happens when the value is set to a rgb string like rgb(102, 187, 106), from what I understand it parses an alpha value as undefined, but then when we pick a color, it generates a string with modern syntax and puts undefined as alpha.
I tried to look at the code and saw that the parseColor util handles it correctly: https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/util/__tests__/colorUtils.spec.ts#L47
So I guess the issue is rather with the color picker component applying the selected color.