Fabioxps Posted March 14, 2018 Posted March 14, 2018 outputConsole(tocolor(255,100,255,255)) return -39681 how to know what color is -39681
Noki Posted March 14, 2018 Posted March 14, 2018 (edited) tocolor converts a series of RGB(A) numbers into hex form. It is just another way of representing colour, like HSV, HSL or CYMK is. Edited March 14, 2018 by Noki 1
MrBiG Posted March 14, 2018 Posted March 14, 2018 1 hour ago, Fabioxps said: outputConsole(tocolor(255,100,255,255)) return -39681 how to know what color is -39681 in your example you cann't you can know any color code from this web site https://html-color-codes.info/ 1
Moderators IIYAMA Posted March 14, 2018 Moderators Posted March 14, 2018 (edited) Better not knowing, it is a computer notation which is not very useful for us humans. And it is the raw output after all. Better save RGBA in a table as input and use that. The only reason for learning this notation is if you are working with a complexes non script language, where that knowledge is required. Edited March 14, 2018 by IIYAMA 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Moderators Pirulax Posted August 18, 2018 Moderators Posted August 18, 2018 (edited) that's a hex converted to a base10 number. You can convert that back to HEX and HEX to RGB I think.Use this to convert from base 10 to HEX and use this to convert from HEX to RGBA Edit: Seems like it returns 255, 255, 100 (R, G, B) instead of 255, 100, 255 (R, G, B) On 3/14/2018 at 23:07, thisdp said: bitExtract This works too. Nice solution. Edited August 18, 2018 by Pirulax
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