A color spectrum representing air temperature
Provides a function which returns a reasonable color (in CSS hex format) for the relative air temperature.
For Node.js & browsers.
$ yarn add the-color-of-air
$ npm install the-color-of-air --save
This library is exported as a UMD bundle.
import {colorOfAir} from 'the-color-of-air';
// fahrenheit
colorOfAir('f', 32); // #0772b8 "french blue"
colorOfAir('f', 73); // #dd531e "flame"
// celsius
colorOfAir('c', 27); // #c53600 "mahogany"
// curry
const colorOfFahrenheit = colorOfAir('f');
colorOfFahrenheit(0); // #d1c9df "languid lavender"
// raw array
import {colorList} from 'the-color-of-air';
colorList[2]; // #a496c0 "amethyst smoke"
const {colorOfAir} = require('the-color-of-air');
// etc
<!-- latest minified version -->
<script src="https://unpkg.com/the-color-of-air"></script>
<script>
(function () {
const colorOfAir = window['the-color-of-air'].colorOfAir;
// etc
}());
</script>
Swatches in various formats are available in the swatches/ directory.
These files are not published to the npm registry.
These colors are pulled from AccuWeather's radar maps.
Copyright 2017, Christopher Hiller. Licensed Apache-2.0.