|
$.Util.convertHexRGB( "hexcol")
$.Util.convertHexRGB() function cannot be applied directly to an element. This function will convert a valid hex color code (6 or 3 characters representation) into RGB values and returns them as Array.
Returns
Example 1
Provide some valid hex color code and click on convert button to see the corresponding RGB values.
JS
HTML
$.domLoaded(function() {
$.get("#btn1").on("click", function() {
//Get hex color from input text field
var hexcol = $.get("#inp").element().value;
// convert hex color code to RGB and return as an array
alert($.Util.convertHexRGB(hexcol));
});
});
Result
| |||||
