<commit_before># colorcube.js

this is ajavascript port of [ColorCube](https://github.com/pixelogik/ColorCube), by <NAME>.

ColorCube is for dominant color extraction from RGB images

<div style="color: red">
colorcube-js uses ES6 features

this will probably only work in Chrome Canary until v45 goes stable in September, '15.
</div>


## usage

```js
let cc = new ColorCube(30); // 30 is the resolution
let image = document.getElementById("image");
let colors = cc.get_colors(image);
console.log(colors);
```

## TODO

-   [x] copy the python code over
-   [x] deal with canvasizing images
-   [x] document usage
-   [ ] clean up API // hide more information
-   [ ] transpile out all the es7 features I'm using...<commit_msg>important warning<commit_after># colorcube.js

this is ajavascript port of [ColorCube](https://github.com/pixelogik/ColorCube), by <NAME>.

ColorCube is for dominant color extraction from RGB images

# ¡¡¡IMPORTANT WARNING!!!

colorcube-js uses ES6 features

this will probably only work in Chrome Canary until v45 goes stable in September, '15.


## usage

```js
let cc = new ColorCube(30); // 30 is the resolution
let image = document.getElementById("image");
let colors = cc.get_colors(image);
console.log(colors);
```

## TODO

-   [x] copy the python code over
-   [x] deal with canvasizing images
-   [x] document usage
-   [ ] clean up API // hide more information
-   [ ] transpile out all the es7 features I'm using...
{'fraction_non_alphanumeric': 0.1154639175257732, 'fraction_numerical': 0.013745704467353952, 'mean_word_length': 3.9023569023569022, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '390165', 'n_tokens_mistral': 471, 'n_tokens_neox': 446, 'n_words': 174}