playMaker

Author Topic: ColorMix  (Read 104 times)

Thore

  • Full Member
  • ***
  • Posts: 105
    • View Profile
ColorMix
« on: September 20, 2018, 03:56:06 PM »
Humble beginnings, part three. I made another tiny action.

ColorMix
You provide two colors, and a mix value (0.5 is 50% of each), and it returns you the resulting color, which you can store and use from there.

Use Case
You can tint sprites using the color field in the inspector. This action makes it possible for example to tint "just a bit" towards a second color, which is particularily useful when sprites use different tints, or when you want to change the amount of tint based on some gameplay parameter, e.g. health bar changing color based on HP left.

Tip: Use FloatRemap (Ecosystem) to convert any range to [0-1], which you can then feed as mix value.

« Last Edit: September 25, 2018, 01:21:51 PM by Thore »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3520
    • View Profile
    • jinxtergames
Re: ColorMix
« Reply #1 on: September 20, 2018, 10:34:49 PM »
Hi.
Nice action.

I have updated the action so it can be used every frame and added some lines so it can be placed on the Ecosystem.

is it ok for me to place it on the Ecosystem?

Thore

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: ColorMix
« Reply #2 on: September 21, 2018, 01:48:58 AM »
Hi djdino,

Thanks for the update, and adding it to ecosystem :)