HappyMeal Posted January 4, 2016 Share Posted January 4, 2016 How it's possible to set color to a guiCreateStaticImage Link to comment
Tails Posted January 4, 2016 Share Posted January 4, 2016 Hi HappyMeal, guiSetProperty(theImage, "ImageColours", "tl:FFD7D7D7 tr:FFD7D7D7 bl:FFD7D7D7 br:FFD7D7D7") More info: https://forum.multitheftauto.com/viewtopic.php?f ... lit=+color Link to comment
HappyMeal Posted January 5, 2016 Author Share Posted January 5, 2016 Explain me how to set it red. Link to comment
Tails Posted January 5, 2016 Share Posted January 5, 2016 Well, in the other topic it says it specifies a hex color in the form of AARRGGBB, AA stands for Alpha, RR for red, GG for green and BB for blue. So I'm guessing this would make it red for you: tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000") FF means 255 or the highest possible value for a color and 0 means nothing or black. It's just a hex color code except for the first two characters which is the alpha. Also try this: tl:FFFF0000 tr:FF00FF00 bl:FF0000FF br:FFFFFFFF") Link to comment
HappyMeal Posted January 5, 2016 Author Share Posted January 5, 2016 R,g,b but for it? Link to comment
Tails Posted January 5, 2016 Share Posted January 5, 2016 I don't think so but you can use http://www.colorpickertool.com/. Though you can try to make your own function to convert R,G,B values to a 'FFFF0000' value. Don't ask me how. Maybe there's already something for it if you look it up. Link to comment
HappyMeal Posted January 5, 2016 Author Share Posted January 5, 2016 Please tell me how to make rgb to hex and to set this. Link to comment
Addlibs Posted January 5, 2016 Share Posted January 5, 2016 (edited) string.format("%X%X%X%X", a, r, g, b) -- a = alpha, -- r = red, -- g = green, -- b = blue (duh) Edit: string.format("%.2X%.2X%.2X%.2X", a, r, g, b) -- a = alpha, -- r = red, -- g = green, -- b = blue (duh) Edited January 6, 2016 by Guest Link to comment
HappyMeal Posted January 6, 2016 Author Share Posted January 6, 2016 To set in this script hex guiSetProperty(theImage, "ImageColours", "tl:FFD7D7D7 tr:FFD7D7D7 bl:FFD7D7D7 br:FFD7D7D7") Link to comment
Revolt Posted January 6, 2016 Share Posted January 6, 2016 string.format("%X%X%X%X", a, r, g, b) -- a = alpha, -- r = red, -- g = green, -- b = blue (duh) string.format("#%.2X%.2X%.2X%.2X", a, r, g, b) If integer is smaller than 15, then rather use this one. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now