-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support #rrggbbaa and #rgba #36
Conversation
This will present a problem for us. The current I remember us having discussions about supporting a 4 channel hex in the parser, but ultimately dropped it because there are conflicting standards on whether the alpha channel goes first or last. Locking it in one position potentially excludes the opposite user group :( What to do? |
The discussion in the "added threejs format" PR adds a bit more depth to this. We actually decided back then to remove support for formats that might be ambiguous. Is it time to revisit that decision? |
The biggest annoyance I have is that anyone can add a plugin for whatever output they desire. But the parser doesn't really allow for extensions at the moment, so there is no way an outsider who just wants a specific format can add it to the parser |
Ah, I had totally forgotten about that Android thing. This just seemed like 15 minutes of fun coding. Didn't check whether that new color spec was a candidate recommendation or whatever yet, but yeah, I think it's time to revisit the decision. |
Oh the joys of cross browser incompatibilities and bleeding edge technology. I've got a situation where a const hexToRgba = require('hex-and-rgba').hexToRgba;
const rgbaToHex = require('hex-and-rgba').rgbaToHex;
try {
fill = hex = color(fill.toString().replace('0x','#')).cssa();
} catch(e) {
fill = hexToRgba(fill.replace('0x','#'));
opacity = fill[3];
fill = `rgba(${fill[0]},${fill[1]},${fill[2]},${fill[3]})`;
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See discussion in comments. The only thing that has changed is that now Github has this functionality to show status better :)
I just noticed this on my list of open pull requests. CSS Color Module Level 4 is still a working draft, so I guess we can't really move it forward still. Standards are slow :) |
Browsers you notation where Alhpa comes as last 2 symbols. Can't use this lib because of it :( |
* master: (26 commits) Fix output quoting. Rework the README to allow the examples to be validated. New build Fix rollup config Switch from rollup-plugin-commonjs to @rollup/plugin-commonjs Replace uglify-js with rollup-plugin-terser, update rollup, simplify build setup Test on more node.js versions, lint and build on 14. Avoid no-prototype-builtins error eslint --fix . && prettier --write '**/*.js' Replace jshint with eslint prettier --write '**/*.{js,md}' Add prettier setup Try building on node.js 12 always, and only run the tests on the Travis-provided one Rename travis script to ci Drop package-lock.json, disable save-exact in .npmrc Bump lodash from 4.17.11 to 4.17.19 Make npm build script possible to run on windows. refs #42 (comment) 3.1.0 Add luminance, contrast and darkness values Update author's email ...
😢 I've brought this branch back to life and changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I think the CSS color module is what we want to follow.
Major version bump it is
Released in 4.0.0 |
No description provided.