Skip to content

Instantly share code, notes, and snippets.


Gordon P. Hemsley GPHemsley

View GitHub Profile
View dominant-color.js
function getDominantColor(aImg) {
let canvas = document.createElement("canvas");
canvas.height = aImg.height;
canvas.width = aImg.width;
let context = canvas.getContext("2d");
context.drawImage(aImg, 0, 0);
// keep track of how many times a color appears in the image
let colorCount = {};
GPHemsley / python_collections.mediawiki
Last active Aug 29, 2015
Table of collection data types in Python
View python_collections.mediawiki
container ordered members? unique members? immutable type? used for keys in
You can’t perform that action at this time.