Comments (4)
Thanks for the info. This will be a little tricky, since IE filters use the backwards hex8 format. But I think we can special case that in the toFilter
function. I doubt that too many people are using hex8 right now (it was added mainly to support toFilter
), so the risk of changing the semantics is probably not too big.
from tinycolor.
If you'd like to contribute these changes, I'd be happy to accept a patch. Here's what would need to be done:
- modify rgbaToHex to flip where transparency shows up:
Line 510 in 8cc9ee6
- Add an 'allow4Char' parameter to that function that behaves just like 'allow3Char' does here:
Line 500 in 8cc9ee6
- Add the 'allow4Char' parameter to
toHex8()
andtoHex8String()
. We could consider renaming it totoHexAlpha
or something. - Add some tests for these features:
Line 156 in 8cc9ee6
- We also should move the current logic in
rgbaToHex
into thetoFilter
function, since it's important the semantics stay the same for this.
from tinycolor.
Does anyone know how to code this (I do not code myself!).
Cin cin
from tinycolor.
This is closed by #136
from tinycolor.
Related Issues (20)
- Details lost when lightening or brightening an image
- Monochrome is only working in in darker range.
- Trying to get in touch regarding a security issue
- In built way to automatically Darken or Lighten by amount depending on the color luminance
- Is toFloatString() implemented?
- React 18 types mismatch
- Feature: include alpha in Hex HOT 2
- Is there a way to reverse a colour, like a negative image?
- Support for LCH?
- Octal literal in strict mode
- tinycolor.mix(color1, color2, amount = 50) not working in React native HOT 1
- Doesn't work with calc HOT 1
- tinycolor is not a function HOT 39
- remove `engines` field from package.json
- Task: Publish 1.6.0 to npm
- Remove tinycolor.js and dist/tinycolor-min.js once we confirm they aren't used HOT 1
- Include a Changelog HOT 4
- asset files includes ES6 syntax HOT 2
- Task: Publish 1.6.1
- [Question] Overlay Colors
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 tinycolor.