File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- # swatchify
1+ # swatchme
22
33Extract dominant colors from images using k-means clustering — browser-only, zero dependencies.
44
55## Install
66
77``` bash
8- npm install swatchify
8+ npm install swatchme
99```
1010
1111## Usage
1212
1313``` ts
14- import { extractColors , generatePaletteCanvas } from ' swatchify ' ;
14+ import { extractColors , generatePaletteCanvas } from ' swatchme ' ;
1515
1616// From file input
1717const file = document .querySelector (' input[type="file"]' ).files [0 ];
@@ -77,7 +77,7 @@ img.src = dataUrl;
7777Get black or white text color for optimal contrast on a background.
7878
7979``` ts
80- import { getContrastColor } from ' swatchify ' ;
80+ import { getContrastColor } from ' swatchme ' ;
8181
8282const textColor = getContrastColor ({ r: 74 , g: 144 , b: 217 });
8383// '#FFFFFF'
Original file line number Diff line number Diff line change 11{
2- "name" : " swatchify " ,
2+ "name" : " swatchme " ,
33 "version" : " 0.1.0" ,
44 "description" : " Extract dominant colors from images using k-means clustering - browser-only, no dependencies" ,
55 "type" : " module" ,
You can’t perform that action at this time.
0 commit comments