Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Question about alpha channels.

A topic by Mayedl10 created Jan 24, 2024 Views: 96
Viewing posts 1 to 1

[disclaimer: I already asked this question before at the last 1-bit jam, but didn't get any answers, so I'm asking again]

If I have my background a colour A, and a second colour B, can I render text with colour A and then add a "shade" with colour A, but A's alpha channel is halved? Is that allowed?

meaning: the background is rendered as (for example) 0xFF00FF with alpha = 255. Then I render text with a second colour as (for example) 0x00FF00 with alpha = 255. Can I add a "shade" to the text if I use the same colour but different alpha? (in this example, 0x00FF00 with alpha = 128)
This would be what it looks like.

code for this would probably be something like this: