material-color-utilities icon indicating copy to clipboard operation
material-color-utilities copied to clipboard

Document all function and add code samples

Open FluorescentHallucinogen opened this issue 3 years ago • 9 comments

The packages from this project definitely need docs. :)

FluorescentHallucinogen avatar Nov 24 '21 11:11 FluorescentHallucinogen

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

guidezpl avatar Nov 24 '21 11:11 guidezpl

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.

FluorescentHallucinogen avatar Nov 24 '21 11:11 FluorescentHallucinogen

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

guidezpl avatar Nov 24 '21 12:11 guidezpl

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 avatar Nov 25 '21 13:11 FluorescentHallucinogen

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

FluorescentHallucinogen avatar Nov 25 '21 13:11 FluorescentHallucinogen

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!

guidezpl avatar Nov 25 '21 14:11 guidezpl

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!

selfire1 avatar Dec 07 '21 11:12 selfire1

Typescript example added :)

rodydavis avatar Feb 16 '22 19:02 rodydavis

The document is necessary

Galileo01 avatar Apr 04 '22 05:04 Galileo01