# Adding hexadecimals to output one mixed color in code

**URL:** https://forum.kirupa.com/t/adding-hexadecimals-to-output-one-mixed-color-in-code/635110
**Category:** programming
**Created:** [August 14, 2016, 4:09pm UTC](https://forum.kirupa.com/t/adding-hexadecimals-to-output-one-mixed-color-in-code/635110 "2016-08-14T16:09:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Nukedpenguin](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@Nukedpenguin](https://forum.kirupa.com/u/Nukedpenguin)
#### Post date: [August 14, 2016, 4:09pm UTC](https://forum.kirupa.com/t/adding-hexadecimals-to-output-one-mixed-color-in-code/635110/1 "2016-08-14T16:09:26Z")

</div>

Does anyone know how to add multiple hexadecimals that have different strengths together to output one solid color?

Trouble has arisen when I tried to add 7 hexadecimal colors to output one color, because the value was inaccurate and too long to be a hexadecimal code. My goal is to achieve the same effect as stacking slightly opaque tinted squares. I just don’t want to bog down the system by having stacks of 7 squares everywhere when I could just have 1 square everywhere. Each square has a different alpha to exert more color than other squares in the stack, but the overall alpha is exactly 100% for a solid color.

Thanks for the help.
