Comments (18)
Hi, just to check if we have this feature already?
from color.
Nope, but if something needs to be implemented, it will be probably #rrggbbaa
.
Should be done easily by adding hexAlphaString
in color-string
package.
from color.
Nope, its AARRGGBB
from color.
https://msdn.microsoft.com/en-us/library/ms532930(v=vs.85).aspx
Color is expressed in #AARRGGBB format, where AA is the alpha hexadecimal value, RR is the red hexadecimal value, GG is the green hexadecimal value, and BB is the blue hexadecimal value. The alpha value controls the opacity of the object. An alpha value of 00 is transparent, while a value of FF is opaque.
from color.
ARGB or RGBA are two different representations - both are valid, but some are used in different places. RGBA makes more sense from an API standpoint since common overloading practices append "optional" parameters to the end.
from color.
yep, however what I was asking for was specifically a string for IE compatible argb thing.
from color.
Unless I'm mistaken, you should be able to pass ARGB values to RGBA and get the intended result.
from color.
Well I need to covert to ARGB, not from.
from color.
I didn't find any reference whether IE filter supports rgba or anything else.
from color.
w3c css color spec only mention #rrggbbaa (or #rgba) https://drafts.csswg.org/css-color/#hex-notation
Anyway, PR are always welcome. I think we can bring that with alphaHexString (#argb) and hexAlphaString (#rgba).
from color.
I think its IE only non standard thing.
from color.
(sigh) Of course it's an IE thing. I'll add this in the new version.
from color.
👍
from color.
@Qix- It's in recent CSS specs too.
from color.
This is actually a color-string
addition :) I'll create a ticket for you.
Thanks for bringing it up! I'm not sure if it'll make it into the 1.x makeover at this point, but I'll definitely address it.
from color.
Nope, feel free to help out and open a PR :)
from color.
I have opened a PR for this. Please help review :- @Qix-
from color.
Released .hexa()
as 4.2.0
. Thanks @n0rush :)
from color.
Related Issues (20)
- Error on function isLight() and isDark()
- Fix luminosity by removing underscore
- node_modules/color/index.js: Unexpected token: name (_28) in file node_modules/color/index.js at 236:30. HOT 1
- How to resolve React: Module parse failed: Identifier directly after number (numberic separator) HOT 1
- "Error: Unable to parse color from string: #10b981" HOT 1
- [BUG] `hex` method discards alpha HOT 3
- Invalid value input is not handled properly HOT 2
- Need help to update the @types/color definitions HOT 4
- Can't bundle js for react-native project
- `.hex()` silently drops alpha info. HOT 1
- Please just add to README about using v3 instead of v4 on unsupported envs HOT 3
- React native BUILD FAILED using [email protected]
- Relative Luminance equation HOT 1
- Bug in alpha handling during model conversions HOT 1
- ma.js HOT 1
- 🏳️🌈
- React Native is back! Thank's for listen to us! HOT 1
- Provide esm version / exports HOT 12
- Unable to parse RGBA no comma alpha value in percentage. HOT 4
- @types/color outdated
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 color.