Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

on second click javascript

function hexToRgb(hex){
	var result = /^#?([a-fd]{2}])([a-fd]{2})([a-fd]{2})$/i.exec(hex);
  	
 	return result ? {
    	r: parseInt(result[1],  16);
      	g: parseInt(result[2],  16);
  		b: parseInt(result[3],  16);
    } : null;
}
var hex = "#0a3678";
alert(hexToRgb(hex).r+","+hexToRgb(hex).g+","+hexToRgb(hex).b);//10,54,120
Comment

PREVIOUS NEXT
Code Example
Javascript :: Print Files with React 
Javascript :: how to jump one page to another on specific tab elementor 
Javascript :: asp.net mvc with ext js 
Javascript :: error number:-1,state:0,class:20 
Javascript :: convertToSlug 
Javascript :: Set object Relation with Array objects javascript 
Javascript :: one dimensional array in javascript 
Javascript :: is element displayed js 
Javascript :: tokenize javascript 
Javascript :: get decimal on number javscri 
Javascript :: nestjs multer file upload delay 
Javascript :: $(document).ready(function () { $(".inputs").click(function () { alert($(this).id); }); }); 
Javascript :: decrypt javascript code 
Javascript :: when i add data into the input it disappeared in react 
Javascript :: input should reject non-alphabetical input reacj js 
Javascript :: node js 42school 
Javascript :: javascript get hours and minutes from date 
Javascript :: radio button form validation 
Javascript :: Star Wars Celebration 
Javascript :: react extends component App.defaultProps 
Javascript :: how to use graph api with react native 
Javascript :: _.isEqual Underscore Example 
Javascript :: CDNs for arquero 
Javascript :: map function usage in frontend 
Javascript :: reverse 
Javascript :: Parsing the URL string using the WHATWG API 
Javascript :: hide header on button click in react native 
Javascript :: for loop increment by more than one 
Javascript :: nested object 
Javascript :: pymxs naming nodes 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =