0Day Forums
[PHP] Convert hex color codes to RGB - Printable Version

+- 0Day Forums (https://0day.red)
+-- Forum: Coding (https://0day.red/Forum-Coding)
+--- Forum: PHP (https://0day.red/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 - slowhound155832 - 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.

Hidden Content



RE: [PHP] Convert hex color codes to RGB - protomeristem843450 - 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 - herder455 - 03-23-2018

Quote:(03-23-2018, 05:42 AM)mothered Wrote:

[To see links please register here]

Although there are many online tools that serve the same function, nonetheless, I'll keep this on hand.

Thanks.

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 - shornick597 - 03-23-2018

Quote:(03-23-2018, 07:07 AM)chunky Wrote:

[To see links please register here]

Quote: (03-23-2018, 05:42 AM)mothered Wrote:

[To see links please register here]

Although there are many online tools that serve the same function, nonetheless, I'll keep this on hand.

Thanks.

Well this allows you to build your own online tool hehe, even tho I’d use JS for such a tool.

I'd just do it in my head...


RE: [PHP] Convert hex color codes to RGB - velvetwork565322 - 03-23-2018

Quote:(03-23-2018, 07:25 AM)Ender Wrote:

[To see links please register here]

Quote: (03-23-2018, 07:07 AM)chunky Wrote:

[To see links please register here]

Quote: (03-23-2018, 05:42 AM)mothered Wrote:

[To see links please register here]

Although there are many online tools that serve the same function, nonetheless, I'll keep this on hand.

Thanks.

Well this allows you to build your own online tool hehe, even tho I’d use JS for such a tool.

I'd just do it in my head...

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 - Mrsynesthesiapctuviiwq - 03-23-2018

Quote:(03-23-2018, 07:38 AM)chunky Wrote:

[To see links please register here]

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 - carmagnole862 - 03-23-2018

Quote:(03-23-2018, 10:07 AM)mothered Wrote:

[To see links please register here]

Quote: (03-23-2018, 07:38 AM)chunky Wrote:

[To see links please register here]

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.

Well you simply gotta want to understand it, its just basic math.


RE: [PHP] Convert hex color codes to RGB - slightest504702 - 03-23-2018

Thank you bro for sharing.