4.1.0 • Published 2 years ago

rgb-hex v4.1.0

Weekly downloads
282,486
License
MIT
Repository
github
Last release
2 years ago

rgb-hex

Convert RGB(A) color to HEX

Install

$ npm install rgb-hex

Usage

import rgbHex from '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

do-fnfigma-token-generatorbb-toolbarbackbee-toolbarsprite-nestsalesforce-query-editor-app@renoki-games/node-perlin-noisesalesforce-query-editor-testi-lab-lowcode@getcircuit/tailwind@infinitebrahmanuniverse/nolb-rgselfrefactor@everything-registry/sub-chunk-2666tanga-pattern-librarytailwind-zeplin-extensionworkflow-chartteeny-colortest-real-stylesthreetoolsvite-plugin-image-placeholderitermcolors-to-hexiobroker.wledixcanulikonaimg2cssimage-average-colourgsap-video-exporthotsparserjsmastergo-toolsmarkmelorco@types/rgb-hex@thekindestruss/colorpicker@viamedici-spc/configurator-framer@useweb/figma-to-code@yeager-dev/uiadmin-ui-element-plusadmin-ui-element-plus-addaframe-urdfalfred-feminearchitecture-builder@atlasbot/colour@acromedia/gesso@create-figma-plugin/utilities@concord-consortium/slate-editor@allmaps/stdlibstring-to-colorsurrogate-mapttb-huemagictongmap-component@bezet/palette@bolt/build-stylesyeditorsweb-accessibility-checkerweb-colorweb-image-infoungic@nexojs/command-line@neomorphism/ng-neomorphism@napolab/alpha-blend@react-theming/flatten@react-native-swift/core@react-native-swift/notifications@react-native-advanced/core@react-native-advanced/notifications@react-vertex/color-hooks@purduehackers/time@redhat-cloud-services/frontend-components-pdf-generator@realness.online/web@roast-cms/theme-sugarmycel-widgetpalette-skinreact-meteo-chartreact-native-color-lensscu-web-componentsremovdreact-native-swift-basenode-red-huemagnode-sass-json-functionsnode-sass-functions-jsonnearest-pantoneplugin-brickspostcss-color-rgba-fallbackpsd_to_imagergb-hex-clisindresorhus.jsshorten-hex-colorreact-svg-patternsgit-labelmakergpmctestcartocss2leafletcfx.neckbeardcolor-curve-adjustcomplem8cosync-clicra-template-peconvert-color-jscorner-colorsdas-clidct-thumbnail
4.1.0

2 years ago

4.0.1

3 years ago

4.0.0

4 years ago

3.0.0

6 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.0.0

11 years ago