Set color to empty
- Dominant language
- JavaScript
- Stars
- 259
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Hey there,
it's not possible to reset color of the iris color picker to an empty value:
`jQuery( element ).wpColorPicker( 'color', '' );` is not working here.
I solved it in following way:
`jQuery( this ).find( '.wp-color-result' ).css( 'background-color', '' );`
On initialization it works fine.
PS: I know it's the wp-color-picker, in iris it would be something like that:
`jQuery( element ).iris( 'color', '' );`
`jQuery( this ).find( '.iris-result' ).css( 'background-color', '' );`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the empty-value call through jQuery(element).wpColorPicker('color', '') and compare it with initialization and the equivalent iris('color', '') behavior. Check the .wp-color-result and .iris-result entry points; done means resetting the picker through its API clears the displayed color without requiring direct CSS changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100