summaryrefslogtreecommitdiff
path: root/node_modules/rgb-hex/readme.md
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:20:49 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:20:49 +0800
commitc5a5384e846f242e901e859fe600d695d8990a9a (patch)
tree079d4ccf2ed93dc1f0cae74a6d3b4a42ac387ece /node_modules/rgb-hex/readme.md
parentd261b7aafee0e6e5c7b853cb8dfe609cc0a0ac9e (diff)
legacy browser support via plugins from postcss
Diffstat (limited to 'node_modules/rgb-hex/readme.md')
-rw-r--r--node_modules/rgb-hex/readme.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/node_modules/rgb-hex/readme.md b/node_modules/rgb-hex/readme.md
new file mode 100644
index 00000000..528c91a4
--- /dev/null
+++ b/node_modules/rgb-hex/readme.md
@@ -0,0 +1,43 @@
+# rgb-hex [![Build Status](https://travis-ci.org/sindresorhus/rgb-hex.svg?branch=master)](https://travis-ci.org/sindresorhus/rgb-hex)
+
+> Convert RGB(A) color to HEX
+
+
+## Install
+
+```
+$ npm install rgb-hex
+```
+
+
+## Usage
+
+```js
+const rgbHex = require('rgb-hex');
+
+rgbHex(65, 131, 196);
+//=> '4183c4'
+
+rgbHex('rgb(40, 42, 54)');
+//=> '282a36'
+
+rgbHex(65, 131, 196, 0.2);
+//=> '4183c433'
+
+rgbHex(40, 42, 54, '75%');
+//=> '282a36bf'
+
+rgbHex('rgba(40, 42, 54, 75%)');
+//=> '282a36bf'
+```
+
+
+## Related
+
+- [rgb-hex-cli](https://github.com/sindresorhus/rgb-hex-cli) - CLI for this module
+- [hex-rgb](https://github.com/sindresorhus/hex-rgb) - Convert HEX color to RGB
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)