colorjs / color-parse Goto Github PK
View Code? Open in Web Editor NEWColor string parser
License: MIT License
Color string parser
License: MIT License
And others:
.valid-css-color-function-colors {
--srgb: color(srgb 1 1 1);
--srgb-linear: color(srgb-linear 100% 100% 100% / 50%);
--display-p3: color(display-p3 1 1 1);
--rec2020: color(rec2020 0 0 0);
--a98-rgb: color(a98-rgb 1 1 1 / 25%);
--prophoto: color(prophoto-rgb 0% 0% 0%);
--xyz: color(xyz 1 1 1);
}
All the colors exported from color-name are lower case
but CSS keywords are supposed to be case insensitive
https://drafts.csswg.org/css-color/#named-colors
parse('blue')
works but parse('BLUE')
doesn't work
Invalid Podfile file: 859: unexpected token at 'Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /usr/app/node_modules/color-parse/package.json
This error occurs when I run pod install
in a react-native project with:
react-native: 0.69
node: 17.8.0
react: 17.0.2
since the api is pretty simple, adding a d.ts file can help typescript users if the authors are not interested in re-writing the package in ts. even creating a definitely-typed package can help
export default function parse(cstr:string): {
alpha: number;
values:[number, number, number];
space:'rgb'|'hsl';
}
That is just a simple example that can help fellow Devs to use the library and won't require a full rewrite
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.