Comments (8)
That's probably an artifact of the rounding of the alpha value. This color picker only supports integer alpha values between 0 and 100, but the hex alpha values (which go from 0 to 255) map to decimal values which are then rounded to the closest integer value.
Could you explain how this presents a problem for you? I'd be quite surprised if anyone can tell the difference between alpha values 50 and 51, let alone 50.5!
from coloris.
I reported it as a issues because when creating an app for this type of conversion, only the input for the alpha channel is rounded.
If it is based on a human sense, then it is not a problem at all.
Thank you for the good color picker.
from coloris.
Thanks for the kind words.
By the way, the color picker already has a built-in format conversion tool that you can activate by setting the option formatToggle
to true
, though it doesn't support the hwb color format.
In your screenshot, what are those values in the 3rd and 4th fields?
from coloris.
I am aware that there are built-in conversions, but I wanted an app that could quickly and easily copy each format and also provide features like rounding to 3-digits hex values.
To achieve this, I'm using a combination of external libraries to convert the output of Coloris.
While bug-fixing in this app, I noticed an unexpected rounding behavior and was able to reproduce it using Coloris alone then i reported.
It's a very straightforward idea, but I think that by reducing the slider's step from 1 to, for example, 0.001, we can minimize the necessary changes to the current calculation function and potentially resolve this issue.
Considering that it hasn't been reported by others, it might be a niche issue.
That's why, If it's feasible, I kindly request you to please take it into consideration.
Thank you.
from coloris.
im not aware of the specific circumstances that led to the use of toFixed of internal alpha value, so I cannot ascertain if this is the correct fix.
However, based on my usage, I implemented the following approach for the correction, which I will provide for your reference.(AnonUsr-Dev/Coloris@0d8ca4d)
from coloris.
im not aware of the specific circumstances that led to the use of toFixed of internal alpha value, so I cannot ascertain if this is the correct fix.
The use of toFixed()
to format the alpha value was a workaround to fix the bug #35, which was caused by the Chrome bug https://issues.chromium.org/issues/40824169.
It looks like the Chrome bug has been fixed around 16 months ago, so it probably safe to remove that workaround. I just need to test it to make sure there will be no regressions.
from coloris.
i understand, Thank you for your response to this issue.
from coloris.
I just published a new version that should fix your problem.
from coloris.
Related Issues (20)
- Add 'Cancel' button (or any custom button) HOT 5
- Materializecss compatibility HOT 2
- Popup Input Issue HOT 3
- Mouse does not lineup on palette after scrolling in scrollable container HOT 3
- Include SCSS file with variables HOT 10
- Add support for CSS custom properties (variables) HOT 1
- Colorpicker wraps all input fields on page load HOT 6
- I would like to contribute sass/scss to the repository HOT 4
- ARIA: issue with Inline `#clr-color-marker` HOT 6
- The color picker doesn't stick to the input it scrolls along HOT 2
- Option to not style the input element HOT 8
- Make `el` and `parent` options accept `Node` HOT 12
- colorArea doesn't handle right mouse button HOT 2
- Feature Request: Add Eyedropper HOT 2
- Missing info in docs about setting up thumbnails HOT 4
- Not showing in absolute positioned div HOT 2
- Alpha channel loses information HOT 5
- colorArea issue with CSS zoom HOT 1
- Coloris does not call the onChange event if the mouse is released outside the colorArea HOT 3
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 coloris.