# Calculating RBG-color

**URL:** <https://forum.kirupa.com/t/calculating-rbg-color/329521>\
**Category:** flash\
**Created:** [September 8, 2012, 11:31pm UTC](https://forum.kirupa.com/t/calculating-rbg-color/329521 "2012-09-08T23:31:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tompa](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@Tompa](https://forum.kirupa.com/u/Tompa)\
**Post date:** [September 8, 2012, 11:31pm UTC](https://forum.kirupa.com/t/calculating-rbg-color/329521/1 "2012-09-08T23:31:51Z")

</div>

This is not a AS3-specific question, but I will place it here anyway… :hitman:  
So I got a color, let’s say [COLOR=#ff0000]\*\*0xFF0000 (red)  
\*\*[/COLOR]And I got another color, \*\*black \*\*with [COLOR=#808080] **50% transparency** [/COLOR].

What I got at the moment is these two colors combined in 2 different sprites that  
obviously makes some **[COLOR=#b22222]wine-red[/COLOR]** color.

I was thinking of a smart way to combine these colors without making 2 sprites,  
so I do like this: \ ***0xFF0000** + **(my 50% black color)** = the color I want,  
\*but unfortunately I couldn’t come up with something…

If anyone understand my problem and can point me into the right direction,  
it would be very appreciated!

_~Tompa_
