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-builderget-color-namefrontier-3d-viewerfrr-webgbpmngcloudgas3d.gl@tamnt-work/dom2exceldnvdominant-colordt-tokenseditor-components-swelement-palette-skinfig-toolsfiggo-sync@purduehackers/time@acromedia/gesso@bolt/build-styles@bezet/palettecartocss2leafletcfx.neckbeardcolor-curve-adjustcomplem8cosync-clicra-template-peconvert-color-jscorner-colorsdas-clidct-thumbnaildesign-system-playgroundcss-proxydeadlightsburano@atlasbot/colour@ausuliv/frontend-components-pdf-generator@allmaps/stdlib@asany/componentsstring-to-colorsurrogate-mapttb-huemagictongmap-componentyeditorsweb-accessibility-checkerweb-colorweb-image-infoungicmycel-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_image
4.1.0

2 years ago

4.0.1

3 years ago

4.0.0

5 years ago

3.0.0

7 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.0.0

11 years ago