Jump to content

Setting gui image color


Gravestone

Recommended Posts

Posted

I recently tried to set a GUI static image's color using guiSetProperty. First I didn't know which property to use so I used GUI Editor, created an image and set it's color to green. This is what the code looked like:

        guiSetProperty(GUIEditor.staticimage[1], "ImageColours", "tl:FF00FF00 tr:FF00FF00 bl:FF00FF00 br:FF00FF00")

Now if I have to set the image's color to specific RGB values, how do I figure out what the code should look like matching this "tl:FF00FF00 tr:FF00FF00 bl:FF00FF00 br:FF00FF00". I hope you guys understand.

Posted

The property has four sections. Top Left, Top Right, Bottom Left, Bottom Right. Each of them uses a HEX code which follows a RGBA structure. FF(Red)00(Green)FF(Blue)00(Alpha). So just get a normal RGB hex code and add to it at the end FF for 100% Alpha or 00 for 0% Alpha.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...