rgbHex Intro




Intro

The converter will automatically detect and convert between RGB and HEX formats.

Sponsor Me

If you like this project, please consider sponsoring.

Usage

The plugin supports various formats for usage.

es5

var rgbHex  = require('rgbhex');

console.log(rgbHex('rgb(0, 0, 0)')); // #000000

jQuery

<script src="/rgbHex/dist/jquery-rgbHex.min.js"></script>

<script>
    console.log($.rgbHex('rgb(0, 0, 0)')); // #000000
</script>

JavaScript

<script src="/rgbHex/dist/rgbHex.min.js"></script>

<script>
    console.log(window.rgbHex('rgb(0, 0, 0)')); // #000000
</script>