How js converts hexadecimal to RGB
Editor to share with you how js converts hexadecimal to RGB, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!
Convert hexadecimal → RGB
This is a good way to achieve this goal.
Const hex2rgb = hex = > [1,3,5] .map ((h) = > parseInt (hex.substring (h, h + 2), 16)); hex2rgb ("# 4c0bb5"); / / [76,11,181] are all the contents of the article "how js converts hexadecimal to RGB". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!