Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 1.01 KB

README.md

File metadata and controls

37 lines (23 loc) · 1.01 KB

National Colors

A JSON file containing each country's national colors, in the proper order.

Scraped from https://en.wikipedia.org/wiki/National_colours which seems to be the only place that has the correct colors in the correct order.

Regenerating

A small Ruby script is used to scrape the Wikipedia page. To run it, perform the following commands from this repository's root directory:

cd src
gem install normalize_country nokogiri
ruby extract.rb

Alternatively, if you prefer Bundler:

cd src
bundle install
bundle exec ruby extract.rb

The JSON will be written to national_colors.json. To use a different filename:

ruby extract.rb my_amaaaaaaaazing_filename.json

html-colors

Mapping of CSS color names to hex values are done via a JSON file stolen from the html-colors node package.

License

Released under the MIT License: http://www.opensource.org/licenses/MIT