Comments (2)
People may choose to re-use colors, for example in a loop. So I would expect the example to use the original colors. The other way is also easily possible:
let color = new Color("red");
let color2 = new Color("black");
let gradient = color.range(color2);
// do whatever with old gradient
color.coords[1] = 1;
color2.coords[2] = 1;
let gradient = color.range(color2);
// do whatever with the new gradient
gradient(.5);
from color.js.
Agreed. I'll close this then.
from color.js.
Related Issues (20)
- OkHSL/OkHSV does not use NaN for hue-less colors HOT 5
- Color.js is very error-happy
- Color space should be optional in `setAll()`
- Alpha is only clamped when parsing a color via the constructor, but not in `parse()`
- `color()` with more or fewer arguments should be invalid
- new Color("darkred").display() returns "rgb(0.5451 0 0)" HOT 5
- Newly broken tests HOT 7
- Customize `serialize()` output types without having to specify a whole format HOT 1
- New achromatic logic in LCH is not sufficient for all achromatic colors HOT 1
- Color.js typing for Coords is number even though functions may return null
- Thank you!
- Include htest tests in CI
- Keep track of parsing metadata on `Color` instances
- If parsing metadata is available, default to the same format when serializing
- Preparing for v0.6.0 HOT 11
- [`getAll`] Add an option(?) so that formatted coords can be returned HOT 1
- JSDoc migration broke some type re-exports
- Incorrect serialization of negative values for sRGB and HSL HOT 9
- REC.21000-HLG doesn't handle negative values when converting from rec2020-linear
- Trouble converting to hex HOT 4
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.js.