Comments (6)
I'm pretty sure this is a rounding error in the hsb2rgb
method. You can't type in 176fc9
either, as the same conversion is done on blur.
For my personal notes, the best way to approach this is probably storing the HEX value instead of the HSB value as INPUT data. This will prevent multiple conversions and ensure the selected color is always the same as the INPUT's HEX value.
from jquery-minicolors.
Sorry, I'm not well versed on color math; all I know is that #176fc9 is the color specified by our visual designer and not how to convert that to HEX or HSB and especially not why these functions would introduce rounding errors.
from jquery-minicolors.
Hi, we also got this issue.
But I am not an expert in hsb rgb conversion. I tried to fix it but no failed. Could you tell me if there is any easy workabound?
from jquery-minicolors.
I'm going to try to get this taken care of this week. There's no reason it should be saving the HSB value as data instead of the HEX value. Changing this throughout the plugin will resolve the issue.
from jquery-minicolors.
This issue has been resolved. I'll push the update shortly.
from jquery-minicolors.
The update that I just pushed changes the way opacity
is enabled. The plugin will automatically detect if you have a data-opacity
attribute on the input element. This will no longer work:
$('.picker').miniColors({
opacity: true
});
You'll need to add the data-opacity attribute on your input element:
<input type="text" name="color" value="#fff" data-opacity=".5" />
The value
and opacity
methods still work, or you can check the value
and data-opacity
attributes directly.
from jquery-minicolors.
Related Issues (20)
- Position failed HOT 1
- The position of the picker does not work correctly when the scale value of the body tag is changed. HOT 1
- Request: beforeShow event
- How to import minicolors with webpack? HOT 3
- Performance bugs HOT 3
- displaying HEX code in the color picker panel itself HOT 2
- getting a checked image when selecting a preset swatch HOT 4
- Problem with opacity + wheel HOT 1
- Option to show text input with `inline` option? HOT 1
- Scrolling on mobile HOT 5
- jQuery 4 deprecation warnings
- Any chance of updating this to HDR colours? HOT 1
- Updating settings with shorter array of swatches causes exception
- Initial selection is black HOT 1
- Update github website URL HOT 1
- Use 'Transparent' on swatches HOT 3
- Worst documentation I've even seen ! HOT 1
- bootstrap 5 theme & input-group
- Dynamically add mincolors to a field HOT 1
- Duplicated values in the swatch result in multiple same colors in the swatch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-minicolors.