Hey guys, can anyone help me finding the right function for my problem?

Hey guys,
can anyone help me finding the right function for my problem?

I want to have 3 layers:

  1. front

  2. mask

  3. back

  4. & 3. is done already, but 2. I have some problems to solve.
    I want to use CHSV colors for this layer.
    And I want to merge/blend this with the background.

If I have black on mask, it should be black in total
but if I have “gray” on mask, the background should be visible.
(a kind of alpha blending)

Hope someone can help me here, to find the right function to blend 2 colors correctly.

thanks :wink:

@Mark_Kriegsman do you have any hint for me?

Make your mask 8 bit (0-255) and then use this as your percentage to blend with your background led colour & Black in the blend function.

Thx @Aaron_Liddiment ​ what a good idea. I try this tomorrow. Another idea was to get the hue and sat value and just adjust the brightness value of the background depending on the mask 8bit value…

@Aaron_Liddiment do you have any hint for me, how to draw anti aliasing lines with your awesome LEDMatrix class?

I did do some test code with anti aliased line drawing but was never too happy with the results so didn’t add it to the class. If I can find the code I will post it for you, may take a few days though.

Wow thx. Would be great

@Aaron_Liddiment Sorry to mess in your sources. I extend your cLEDMatrix class to handle more layout matrix types - incl. tiles of matrices.