Adjust HSL vs. Tint

0 favourites
  • 3 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hey all,

    I'm working on color shading for my game's levels. The two effects I have seen that may be pertinent are 'Tint' and 'Adjust HSL'. Adjust HSL seems to be more user friendly - i.e. I like being able to directly control hue, stauration, and lightness, however it seems like I don't have the same range of color options as with Tint - HSL only allows hue rotation, so it seems like I couldn't really have a color 'overlay' as in tint. Or could I?

    I'm basically asking:

    -Can Adjust HSL do everything that Tint does?

    -Can Tint do everything that Adjust HSL does?

    -What's the performance difference like?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • They're different. Tint just does:

    red * red tint

    green * green tint

    blue * blue tint

    Adjust HSL does:

    convert RGB to HSL

    hue * hue adjust

    sat * sat adjust

    lum * lum adjust

    convert HSL to RGB

    Basically, tint treats each RGB color channel individually, but Adjust HSL treats the whole image evenly. Comparing Adjust HSL to Tint:

    Hue rotate: this is a true rotation, so for example red turns green, green turns blue, and blue turns red - in a circle. Tint can't do that, it just boosts or filters individual RGB channels.

    Saturation: basically how greyscale the image is. Tint can't do that, it could only brighten or darken the entire image.

    Luminance: how bright the image is. Tint can't adjust this either: tinting all colors down will reduce the saturation, whereas turning down the luminance preserves saturation. IMO this makes luminance look visually better than tint or multiply for brightness adjustments.

    On the other hand, Adjust HSL can't make something appear only in shades of red, like Tint can: it will only rotate the hues, giving a weird multi-colored effect.

    So:

    If you want to make something look a certain color - use tint

    If you want to adjust the brightness or greyscale-ness, or make a weird color rotate effect - use Adjust HSL

    Both run all on the GPU so are probably both very fast, but if you benchmark them tint will probably be faster because it doesn't have to convert the color system.

  • Thanks for the clarification, Ashley .

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