open.mp forum
[Pawn] Hex to rgba - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Hex to rgba (/showthread.php?tid=1058)



Hex to rgba - KarolPL - 2020-04-20

Hi. Does anyone have a function that changes hex to rgba? I need this function in #define


RE: Hex to rgba - Y_Less - 2020-04-21

Hex IS RGBA. They are both just numbers.


RE: Hex to rgba - EvilShadeZ - 2020-05-08

(2020-04-21, 04:21 PM)Y_Less Wrote: Hex IS RGBA. ?They are both just numbers.



I think he meant converting an RGBA hex colour into 4 separate integer variables representing each channel.



@OP This include has a function called HexToInt that does exactly that.

https://github.com/Gammix/Colors-Library-Include