added GetRGB/GetBGR in Color.h/.cpp

This commit is contained in:
2023-09-15 20:16:19 +08:00
parent c78733216f
commit 2e14c54ca4
2 changed files with 30 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
#include<hgl/TypeFunc.h>
#include<hgl/color/Color4f.h>
#include<hgl/math/Vector.h>
namespace hgl
{
/**
@@ -261,6 +262,9 @@ namespace hgl
ENUM_CLASS_RANGE(AliceBlue,YellowGreen)
};//enum COLOR_ENUM
bool GetRGB(const enum class COLOR &ce,Vector3u8 &);
bool GetBGR(const enum class COLOR &ce,Vector3u8 &);
const uint32 GetRGBA(const enum class COLOR &ce,const uint8 &alpha);
const uint32 GetABGR(const enum class COLOR &ce,const uint8 &alpha);