Skip to content

Commit a14148c

Browse files
authored
Fix comments for color conversion functions
1 parent 0990c4c commit a14148c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

PopLib/graphics/color.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ulong Color::ToInt() const
131131
ARGB Color::ToBGRA() const
132132
{
133133

134-
//Swap the values when your doing BGRA, NOT ARGB! This function converts it from RGBA to BGRA.
134+
//Swap the values when your doing BGRA, NOT ARGB! This function converts it from ARGB to BGRA.
135135
ARGB TheBGRAValue;
136136
TheBGRAValue.b = mAlpha;
137137
TheBGRAValue.g = mRed;
@@ -143,7 +143,7 @@ ARGB Color::ToBGRA() const
143143
YUV Color::ToYUV() const
144144
{
145145
YUV yuv;
146-
//YUV conversion here, uses std::clamp to convert hue sat and lum in the RGBA space.
146+
//YUV conversion here, uses std::clamp to convert hue sat and lum in the RGB space.
147147
yuv.y = CLIP(((66 * mRed + 129 * mGreen + 25 * mBlue + 128) >> 8) + 16);
148148
yuv.u = CLIP(((-38 * mRed - 74 * mGreen + 112 * mBlue + 128) >> 8) + 128);
149149
yuv.v = CLIP(((112 * mRed - 94 * mGreen - 18 * mBlue + 128) >> 8) + 128);

0 commit comments

Comments
 (0)