How do I reset "set color"?

  • I've used the sprites "set color" action in order to change the colour of a sprite, but i want to be able to change it back. There doesn't seem to be a way to disable it again once used.

    The sprite isn't all one colour, like all white, its coloured like normal and "set color" is used as a way to tint it.

    Any way to do this?



  • The default color is white. This is 100% on all color channels. The tint is done by multiplying the color with the image, so 100% on all color channels means the color is unmodified.

  • Ashley Does it work the same way as "Set color" effect? Which is better? I tested on 500+ objects and didn't notice any difference in performance. (on PC at least)

  • So i should set it to rgbEx(100,100,100)?

    I think the c3 manual needs updating as i can find no mention of "set color" in there. This info would be helpful.


  • Ashley Does it work the same way as "Set color" effect?

    No, because 'Set color' overwrites the color, whereas tinting multiplies the color.

  • Ashley, Thanks. So this is not a shader, it actually overwrites pixel information for this image in video memory?

  • No, the built-in color property uses a built-in shader that does a multiply on the colors being rendered. Actually now you mention it the names are confusing - the 'Set color' action modifies the built-in 'color' property, which does a multiply, which is essentially the 'Tint' effect. However the 'Set color' shader effect replaces the RGB color channels when rendering.

    No shaders actually affect the texture held in memory - they just apply processing when it's rendered. As a result you can use different effect parameters, and different built-in color properties, on individual instances.

  • Ashley, thanks for the explanation!

    Since "Set color" action is essentially the "Tint" effect, why did you add it as an action? Was it for convenience and ease of use?

    Also, when using both this action and some other color-changing effect, in which order are they applied?

  • Construct Classic had it and lots of people liked it. Also the built-in opacity setting is actually a multiply based on a single alpha value. If you extend the alpha value to a vector4 to cover RGBA then it's still one multiply and you get a tint effect too, so you kind of get it for free. This way it's also faster than using a tint effect.

    Added effects always render after everything else - they operate on how the object looks without any effects, which includes things like opacity and the built-in color.

  • "If you extend the alpha value to a vector4 to cover RGBA then it's still one multiply"

    If you use Set Color with RGBA, Alpha does not apply. Did you mean it should apply ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The 'Set color' action modifies the RGB components. The 'Set opacity' action modifies the A component.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)