2020-04-01 23:04:40 +00:00
|
|
|
#ifndef __TRACYCOLOR_HPP__
|
|
|
|
#define __TRACYCOLOR_HPP__
|
|
|
|
|
2022-07-02 11:10:31 +00:00
|
|
|
#include <algorithm>
|
2020-04-01 23:04:40 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2022-07-17 11:41:40 +00:00
|
|
|
#include "../public/common/TracyForceInline.hpp"
|
2022-07-02 11:10:31 +00:00
|
|
|
|
2020-04-01 23:04:40 +00:00
|
|
|
namespace tracy
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t GetHsvColor( uint64_t hue, int value );
|
|
|
|
|
2022-07-02 11:10:31 +00:00
|
|
|
template<int V = 25>
|
|
|
|
static tracy_force_inline uint32_t HighlightColor( uint32_t color )
|
|
|
|
{
|
|
|
|
return 0xFF000000 |
|
|
|
|
( std::min<int>( 0xFF, ( ( ( color & 0x00FF0000 ) >> 16 ) + V ) ) << 16 ) |
|
|
|
|
( std::min<int>( 0xFF, ( ( ( color & 0x0000FF00 ) >> 8 ) + V ) ) << 8 ) |
|
|
|
|
( std::min<int>( 0xFF, ( ( ( color & 0x000000FF ) ) + V ) ) );
|
|
|
|
}
|
|
|
|
|
2020-04-01 23:04:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|