cybercoco 16 Posted January 9, 2016 Is there a way to make a color transparent. I am using this http://killzonekid.com/hex-2-arma-gui-colour-converter/ to convert from Hex to ingame color code. However I can't find a way to convert rgba colors (which hold a transparency value) like this one (168, 168, 168, 0.66). Thanks in advance, C.Coco Share this post Link to post Share on other sites
cybercoco 16 Posted January 9, 2016 Tried this method, but it doesn't work... - convert RGBA to ARGB http://beijingyoung.com/articles/rgba-argb-converter/ - convert to (r,g,b,a) http://killzonekid.com/hex-2-arma-gui-colour-converter/ Share this post Link to post Share on other sites
Larrow 2817 Posted January 9, 2016 fnc_hexToColorArray = { params[ "_color" ]; _hexArray = toArray toUpper _color; { _hexArray set [ _forEachIndex, toString [ _x ] ]; }forEach _hexArray; if ( _hexarray select 0 isEqualTo "#" ) then { _nul = _hexArray deleteAt 0; }; _hex = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F" ]; _value = []; for "_i" from 0 to ( count _hexArray ) -1 step 2 do { _nul = _value pushBack ( [ ((( _hex find ( _hexArray select _i )) * 16 ) + ( _hex find ( _hexArray select ( _i + 1 )))) / 255, 3 ] call BIS_fnc_cutDecimals ); }; _value }; "#FFFFFFFF" call fnc_hexToColorArray; fnc_rgbaToColorArray = { _color = _this; for "_i" from 0 to 2 do { if !( _color select _i isEqualTo 0 ) then { _color set [ _i, ( _color select _i ) / 255 ]; }; }; _color }; [ 168, 168, 168, 0.66 ] call fnc_rgbaToColorArray;EDIT: Sorry think i misread the question ^^^ Share this post Link to post Share on other sites
cybercoco 16 Posted January 9, 2016 Thank you Larrow, i'll test it ! Share this post Link to post Share on other sites
cybercoco 16 Posted January 10, 2016 So, do I use this function "fnc_rgbaToColorArray" ? Share this post Link to post Share on other sites
cybercoco 16 Posted January 15, 2016 The two functions are working perfectly ! Thank you ! Share this post Link to post Share on other sites