turning an hex code to rgb discord.js
function hexToRgb(hex) {
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : null;
}
alert(hexToRgb("#0033ff").g); // "51";
Also in JavaScript:
- react native passing params to nested navigators
- How to make a timer in javascript
- angular get current route
- react list based on state
- how to make an express server
- remove react native cli mac
- get random reddit image link
- cypress fixture
- Unterminated quote at columns 0-8 ['MM-yyyy] in expression ['MM-yyyy]
- new create react app
- javascript note
- stream recording javascript
- check unique object in array javascript site:stackoverflow.com
- deutsches ajax framework
- java script member count embed
- Javascript remove last character
- start react native
- adding int and string in react props
- Limit text to specified number of words using Javascript
- javascript sort array of ints
- jquery loop through li element
- javascrpt refresh page
- sort array of objects javascript by value
- js get anchor