Comments (2)
Hi @bheston, it would indeed be a nice thing to figure out, but I donβt see a solution given the current way things are organized.
In the meantime, if minimal payload is crucial, it may be worth experimenting with build-time optimizations such as using import maps (or other bundler features such as Rollup Transformers) to replace the content of colors/named.js
with a dummy export default {}
.
from culori.
Thanks. Yeah, I didn't see a good way to handle it either. I was considering copying and modifying the modeRgb definition to remove the reference to parseNamed and then only use my local definition. It seems like that would work, though runs the risk of getting out of sync.
I wonder if all of the mode
definitions exported all of the pieces if someone could build their own mode definitions without the potential for losing as much as if I were to copy that entire file.
I recently came across this which I think is a similar idea: https://github.com/antfu/shikiji?tab=readme-ov-file#fine-grained-bundle
from culori.
Related Issues (20)
- `lch()` and `lab()` in `formatCss` has no `%` HOT 3
- Culori ESM import throws an error in Next.js production build HOT 5
- Bug in displayable() in oklch HOT 3
- culori.d.ts - Is there an updated type declaration file to use with TypeScript? HOT 1
- Implement parse-time clamping of L lab/oklab/lch/oklch
- XYB: is the Chroma from Luma adjustment correction really in the JXL implementation? HOT 2
- Interpolator throwing a NaN/undefined HOT 4
- Library-wide handling of missing and powerless components HOT 2
- Endless loop when using a double point HOT 2
- Add RYB colors HOT 19
- mix() function, and 2d/3d counterparts
- Dead link in docs HOT 1
- Precise chroma clamping in P3 color space HOT 2
- Suggestion to specify target gamut for clampChroma() HOT 1
- Adjust <number> parsing in HSL / HWB / etc(?) modern syntaxes to appropriate component ranges
- `'culori/fn'` regression in 4.0 HOT 3
- Switch tests from `tape` to native Node test runner
- Addition of CMYK color space HOT 1
- Add DIN99c/d color space HOT 6
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 culori.