rgb-hex

WebJar for rgb-hex

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

rgb-hex
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

rgb-hex
WebJar for rgb-hex
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/rgb-hex

Download rgb-hex

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/rgb-hex/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>rgb-hex</artifactId>
    <version>2.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/rgb-hex/
implementation 'org.webjars.npm:rgb-hex:2.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/rgb-hex/
implementation ("org.webjars.npm:rgb-hex:2.1.0")
'org.webjars.npm:rgb-hex:jar:2.1.0'
<dependency org="org.webjars.npm" name="rgb-hex" rev="2.1.0">
  <artifact name="rgb-hex" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='rgb-hex', version='2.1.0')
)
libraryDependencies += "org.webjars.npm" % "rgb-hex" % "2.1.0"
[org.webjars.npm/rgb-hex "2.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

rgb-hex

Convert RGB(A) color to HEX

Install

$ npm install rgb-hex

Usage

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

License

MIT © Sindre Sorhus

Versions

Version
2.1.0
1.0.0