![]() |
[PHP] Convert hex color codes to RGB - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: PHP (https://sinister.ly/Forum-PHP) +--- Thread: [PHP] Convert hex color codes to RGB (/Thread-PHP-Convert-hex-color-codes-to-RGB) |
[PHP] Convert hex color codes to RGB - chunky - 03-22-2018 I just wrote that small function for a friend of mine and thought it might be worth sharing it. Is anybody interested in how hex color codes work and how to convert them to RGB? I mean that's just some basic stuff but many people use hex color codes everyday without even knowing how to build them. Code: function convertToRGB ($hexValue) RE: [PHP] Convert hex color codes to RGB - mothered - 03-23-2018 Although there are many online tools that serve the same function, nonetheless, I'll keep this on hand. Thanks. RE: [PHP] Convert hex color codes to RGB - chunky - 03-23-2018 (03-23-2018, 05:42 AM)mothered Wrote: Although there are many online tools that serve the same function, nonetheless, I'll keep this on hand. Well this allows you to build your own online tool hehe, even tho I’d use JS for such a tool. RE: [PHP] Convert hex color codes to RGB - Blink - 03-23-2018 (03-23-2018, 07:07 AM)chunky Wrote:(03-23-2018, 05:42 AM)mothered Wrote: Although there are many online tools that serve the same function, nonetheless, I'll keep this on hand. I'd just do it in my head... RE: [PHP] Convert hex color codes to RGB - chunky - 03-23-2018 (03-23-2018, 07:25 AM)Ender Wrote:(03-23-2018, 07:07 AM)chunky Wrote:(03-23-2018, 05:42 AM)mothered Wrote: Although there are many online tools that serve the same function, nonetheless, I'll keep this on hand. You won’t believe how many people are too retarded to turn a 2 digit hexadecimal number into a decimal one in their head... Kinda sad since it’s not hard at all. I mean it’s okay if you never heard anything about the hexadecimal system but some people in my course are still too retarded even tho we covered this topic ages ago. RE: [PHP] Convert hex color codes to RGB - mothered - 03-23-2018 (03-23-2018, 07:38 AM)chunky Wrote: You won’t believe how many people are too retarded to turn a 2 digit hexadecimal number into a decimal one in their head... Some users are not mentally-Inclined, but with some effort, much to their surprise they can In fact solve something as simple as this. Of course, there are those who simply cannot put two and two together. I have no qualms nor anything against those who lack competency- we all have our weaknesses. RE: [PHP] Convert hex color codes to RGB - chunky - 03-23-2018 (03-23-2018, 10:07 AM)mothered Wrote:(03-23-2018, 07:38 AM)chunky Wrote: You won’t believe how many people are too retarded to turn a 2 digit hexadecimal number into a decimal one in their head... Well you simply gotta want to understand it, its just basic math. RE: [PHP] Convert hex color codes to RGB - Mr.Kurd - 03-23-2018 Thank you bro for sharing. |