diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-09-01 10:44:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-01 10:44:36 +0200 |
commit | eac32f082a78a8303fa364d2737f16705b1a74ab (patch) | |
tree | 44f942db7e7672415f4e119fe40b029e1148233e /tests | |
parent | a61cae14696732fca214902161f40450dec2f9cd (diff) | |
parent | 1a5ba0fc0792095b06722bf9d645155bc0451bb3 (diff) |
Merge pull request #40868 from aaronfranke/color-html-rgba
Change Color HTML conversion from ARGB to RGBA
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_color.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test_color.h b/tests/test_color.h index 3633f2746d..dfdc29ec7d 100644 --- a/tests/test_color.h +++ b/tests/test_color.h @@ -39,9 +39,7 @@ namespace TestColor { TEST_CASE("[Color] Constructor methods") { const Color blue_rgba = Color(0.25098, 0.376471, 1, 0.501961); - // HTML currently uses ARGB notation, which is contrary to the CSS standard. - // This may be changed to RGBA in 4.0. - const Color blue_html = Color::html("#804060ff"); + const Color blue_html = Color::html("#4060ff80"); const Color blue_hex = Color::hex(0x4060ff80); const Color blue_hex64 = Color::hex64(0x4040'6060'ffff'8080); @@ -118,10 +116,10 @@ TEST_CASE("[Color] Conversion methods") { const Color cyan_transparent = Color(0, 1, 1, 0); CHECK_MESSAGE( - cyan.to_html() == "ff00ffff", + cyan.to_html() == "00ffffff", "The returned RGB HTML color code should match the expected value."); CHECK_MESSAGE( - cyan_transparent.to_html() == "0000ffff", + cyan_transparent.to_html() == "00ffff00", "The returned RGBA HTML color code should match the expected value."); CHECK_MESSAGE( cyan.to_argb32() == 0xff00ffff, |