Yet another color darkening function.

This commit is contained in:
Bartosz Taudul 2024-09-28 15:08:08 +02:00
parent 7465b4ffaf
commit 2ac51fb597
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -36,6 +36,14 @@ static tracy_force_inline uint32_t DarkenColor( uint32_t color )
( ( ( ( color & 0x000000FF ) ) * 2 / 3 ) );
}
static tracy_force_inline uint32_t DarkenColorHalf( uint32_t color )
{
return 0xFF000000 |
( ( ( ( color & 0x00FF0000 ) >> 16 ) / 2 ) << 16 ) |
( ( ( ( color & 0x0000FF00 ) >> 8 ) / 2 ) << 8 ) |
( ( ( ( color & 0x000000FF ) ) / 2 ) );
}
static tracy_force_inline uint32_t DarkenColorMore( uint32_t color )
{
return 0xFF000000 |