material-foundation / material-color-utilities

Color libraries for Material You
Apache License 2.0
1.7k stars 150 forks source link

Document all function and add code samples #13

Open FluorescentHallucinogen opened 2 years ago

FluorescentHallucinogen commented 2 years ago

The packages from this project definitely need docs. :)

guidezpl commented 2 years ago

Can you please elaborate? There's only a Dart package at the moment.

FluorescentHallucinogen commented 2 years ago

Yes, currently there's only a Dart package,but it seems TypeScript npm package is on horizon. :)

I mean docs for every function and how to use them. Maybe auto-generated from source code annotations. But samples could be very useful too.

guidezpl commented 2 years ago

I agree, complete documentation is on the roadmap! Stay tuned

FluorescentHallucinogen commented 2 years ago

One of the samples I'm very interested in is how to pass image to material-color-utilities. Obviously, some sort of image selector is needed. But what next? What data format does it expect? Should I use Web Workers, OffscreenCanvas, WebAssembly, etc.

FluorescentHallucinogen commented 2 years ago

Just found cool demo for inspiration: https://lokeshdhakar.com/projects/color-thief/. :wink:

guidezpl commented 2 years ago

I'm currently working on a new module to add to the libraries, called extract. It'll be make the process really easy, give it some image and it returns top colors. Coming soon!

selfire1 commented 2 years ago

Hi! I would love to use this project in TypeScript to generate a colour palette from a single source colour. Being in a bit over my head with how to use these utilities, having additional documentation would be great!

rodydavis commented 2 years ago

Typescript example added :)

Galileo01 commented 2 years ago

The document is necessary