meta-theme-color
v0.1.2
Published
Parses a HTML theme-color from a meta tag
Downloads
7
Maintainers
Readme
Parses a HTML theme-color from a meta tag
Install
$ npm install --save meta-theme-color
Usage
var metaThemeColor = require('meta-theme-color');
metaThemeColor('<meta name="theme-color" content="#3372DF">');
// => #3372DF
metaThemeColor('<meta name="theme-color" content="rgb(255,0,0)">');
// => rgb(255,0,0)
metaThemeColor('<meta name="theme-color" content=" red ">');
// => red
metaThemeColor('<meta name="theme-color" content=" rgb(255,0,0) ">');
// => rgb(255,0,0)
metaThemeColor('<html></html>');
// => ''
License
MIT © Addy Osmani