Skip to content

Commit 5665fb8

Browse files
committed
3 hex digit color format fixed.
1 parent 0222753 commit 5665fb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/base/gfx/color.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Color::Color(const std::string &string)
4040
else if (string[0] == '#' && string.size() == 4)
4141
{
4242
auto r = (uint8_t)Text::Character::fromHex(string[1]);
43-
auto g = (uint8_t)Text::Character::fromHex(string[3]);
44-
auto b = (uint8_t)Text::Character::fromHex(string[5]);
43+
auto g = (uint8_t)Text::Character::fromHex(string[2]);
44+
auto b = (uint8_t)Text::Character::fromHex(string[3]);
4545
red = ((r << 4) + r) / 255.0;
4646
green = ((g << 4) + g) / 255.0;
4747
blue = ((b << 4) + b) / 255.0;

0 commit comments

Comments
 (0)