4.1.0 • Published 7 months ago

rgb-hex v4.1.0

Weekly downloads
282,486
License
MIT
Repository
github
Last release
7 months 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-2666ikonaiobroker.wledimage-average-colourixcanulitermcolors-to-hexmarkmeimg2cssnearest-pantonemycel-widgetlorco@types/rgb-hex@react-native-swift/core@react-native-swift/notifications@redhat-cloud-services/frontend-components-pdf-generator@spacejelly/figma-to-cloudinary@thekindestruss/colorpicker@useweb/figma-to-code@viamedici-spc/configurator-framer@purduehackers/time@rango-dev/ui@snowcone/snowconekit@react-vertex/color-hooks@react-native-advanced/core@react-native-advanced/notifications@react-theming/flatten@realness.online/web@srclaunch/ui@roast-cms/theme-sugar@sunify/lerp-color@tamnt-work/dom2excelalfred-femine@yeager-dev/uiadmin-ui-element-plusadmin-ui-element-plus-add@asany/components@atlasbot/colour@concord-consortium/slate-editorcomplem8color-curve-adjust@davidwells/config-postcssconvert-color-js@dayalk/table-to-excel@deboxsoft/svelte-core@bezet/paletteburano@bolt/build-stylescartocss2leafletnode-red-huemagnode-sass-functions-jsonnode-sass-json-functionspsd_to_imagepostcss-color-rgba-fallbackreact-meteo-chartreact-native-color-lenspalette-skinreact-native-swift-baseplugin-bricksremovdscu-web-componentsvite-plugin-image-placeholderungicyeditorsweb-colorweb-accessibility-checkerweb-image-infoworkflow-charttongmap-componentttb-huemagicthreetoolsshorten-hex-colorsurrogate-maptailwind-zeplin-extensiontanga-pattern-librarystring-to-colorrgb-hex-cliteeny-colortest-real-stylessindresorhus.jsreact-svg-patternscfx.neckbeard@create-figma-plugin/utilitieselement-palette-skin@img-arena/img-ui-mui-theme@img-arena/ui-corecorner-colors@divriots/create-figma-plugin-utilitiescosync-cli
4.1.0

7 months ago

4.0.1

1 year ago

4.0.0

3 years ago

3.0.0

5 years ago

2.1.0

7 years ago

2.0.0

8 years ago

1.0.0

10 years ago