Skip to content

Instantly share code, notes, and snippets.

View schuyberg's full-sized avatar

Schuyler Lindberg schuyberg

  • The University of British Columbia
  • Vancouver, BC
View GitHub Profile
@schuyberg
schuyberg / color-conversion-algorithms.js
Created December 14, 2017 20:18 — forked from mjackson/color-conversion-algorithms.js
RGB, HSV, and HSL color conversion algorithms in JavaScript
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation
@schuyberg
schuyberg / ProvinceState Arrays
Created September 11, 2017 21:33 — forked from james2doyle/ProvinceState Arrays
PHP array for states and Provinces in Canada and the US
$provinces = array(0 => 'Alberta',
1 => 'British Columbia',
2 => 'Manitoba',
3 => 'New Brunswick',
4 => 'Newfoundland and Labrador',
5 => 'Northwest Territories',
6 => 'Nova Scotia',
7 => 'Nunavut',
8 => 'Ontario',
9 => 'Prince Edward Island',
{
"@context": {
"@vocab": "http://purl.org/dc/elements/1.1/",
"dcterms": "http://purl.org/dc/terms/",
"dpla": "http://dp.la/terms/",
"edm": "http://www.europeana.eu/schemas/edm/",
"geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
"lcsh": "http://id.loc.gov/authorities/subjects/",
"ore": "http://www.openarchives.org/ore/terms/",
"skos": "http://www.w3.org/2004/02/skos/core#",