https://github.com/sshaw/national_colors
A JSON file containing each country's national colors, in the proper order
https://github.com/sshaw/national_colors
colors country-data country-information json national nationality
Last synced: 2 months ago
JSON representation
A JSON file containing each country's national colors, in the proper order
- Host: GitHub
- URL: https://github.com/sshaw/national_colors
- Owner: sshaw
- Created: 2020-04-04T07:43:16.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-05T21:04:50.000Z (about 5 years ago)
- Last Synced: 2025-02-12T06:59:43.715Z (4 months ago)
- Topics: colors, country-data, country-information, json, national, nationality
- Language: Ruby
- Homepage: https://en.wikipedia.org/wiki/National_colours
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://www.ruby-lang.org/en/) 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.rbAlternatively, if you prefer [Bundler](https://bundler.io/):
cd src
bundle install
bundle exec ruby extract.rbThe 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](https://github.com/radiovisual/html-colors) node package.## License
Released under the MIT License: http://www.opensource.org/licenses/MIT