metafizzy / metafizzy/huebee

Update value even if color is not correct

Open
#37 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
411
Forks
43
PR merge metrics
No merged PRs in 30d

Description

Greetings,

I have an issue, I noticed that the color change function fires up only when the color is valid.

Is there a way to fire it up even if the inputted data is not a valid color?

For example, in the _console.log(this.selectedColor)_, it only fires when the color is valid. Let's say I add **#xxx87**, it doesn't fire up. Is it possible to make it available even when the data is not a valid color?

```
if (!this.colorSelector) {
const elem = this.$el.querySelector('.brand-color-input')
this.colorSelector = new Huebee(elem,{
notation: 'hex',
saturations: 2,
})
this.colorSelector.on('change', (color) => {
this.selectedColor = color
this.colorIcon = elem.style.color
this.$emit('input', this.selectedColor)
console.log(this.selectedColor)
})
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The report only identifies the colorSelector change handler and its Huebee setup, not a repository file or test. Start by locating that handler and tracing how invalid input such as #xxx87 is processed. Done means the expected behavior for invalid colors is defined and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.