Comments (8)
I’ve implemented a fix for this in b301c5b. It was released in package version 4.0.1.
from vue-accessible-color-picker.
@zumm Hey. Thank you for this follow-up report. I believe your issue has the same cause as what was reported in #18. After fixing that issue, opening your demo again and installing v4.0.3, I can no longer reproduce either the color jumping around in the hue slider or the copy button copying a clipped color. Would you mind trying it again? Thank you for your patience.
from vue-accessible-color-picker.
Alpha channel is still in hex property of color object of color-change event. Is it ok?
from vue-accessible-color-picker.
Alpha channel is still in hex property of color object of color-change event. Is it ok?
@zumm That is intentional, yes. In the color-change
event, the cssColor
property will have a value without alpha channel while colors in the colors
property will have a value with alpha channel.
from vue-accessible-color-picker.
cssColor isn't the way for me since it respects color input mode. I want to get hex without alpha channel regardless of color input mode.
Also it seems to be broken. See that example - https://codesandbox.io/s/ancient-water-u2uvtr?file=/src/App.vue
Hex color is getting clipped.
from vue-accessible-color-picker.
I’ve implemented another fix for the behavior that you’re describing in a849207. It was released in package version 4.0.2.
If you always want to get hex colors without alpha channel regardless of the alpha-channel
prop, you will need to apply a transformation like the following:
function handleColorChangeEvent({ colors }) {
const hexWithoutAlphaChannel = [5, 9].includes(colors.hex.length)
? colors.hex.substring(0, colors.hex.length - (colors.hex.length - 1) / 4)
: colors.hex
console.log(hexWithoutAlphaChannel)
}
from vue-accessible-color-picker.
Yes, currently i'm using code like that to get hex without alpha channel. It is not very convenient, but ok.
New patch brings new bugs. Try to update vue-accessible-color-picker version in my previous example and select color by color-space-thumb. Hue slider goes crazy if hue isn't red.
Also i found another bug - hex code is getting clipped while copying.
from vue-accessible-color-picker.
@kleinfreund Now everything works good. Great job. Thx!
from vue-accessible-color-picker.
Related Issues (16)
- Device-independent colors: Add Lab and LCH formats HOT 1
- Provide untranspiled ES module bundles HOT 1
- Disable alpha chanel HOT 4
- Clicking in color space does not always select a color HOT 3
- [Error][TS]Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier. HOT 1
- Custom color viewer HOT 2
- Alpha channel hidden, alpha channel still visible in HEX Color Input HOT 2
- Test coverage reporting in pull requests & readme badge HOT 2
- Basic install doesn't work HOT 2
- Incorrect initialization if color is white HOT 1
- :visible-formats="['hex']" does not work HOT 2
- The automated release is failing 🚨 HOT 1
- Migrate to Vue.js 3 HOT 1
- Types for typescript HOT 2
- Remove typescript development dependency with upcoming vue-jest release 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 vue-accessible-color-picker.