diff --git a/Userland/Services/WebContent/PageClient.cpp b/Userland/Services/WebContent/PageClient.cpp index 64b957df7ce..3e0288e591e 100644 --- a/Userland/Services/WebContent/PageClient.cpp +++ b/Userland/Services/WebContent/PageClient.cpp @@ -145,8 +145,8 @@ void PageClient::setup_palette() VERIFY(!buffer_or_error.is_error()); auto buffer = buffer_or_error.release_value(); auto* theme = buffer.data(); - theme->color[(int)Gfx::ColorRole::Window] = Color::Magenta; - theme->color[(int)Gfx::ColorRole::WindowText] = Color::Cyan; + theme->color[to_underlying(Gfx::ColorRole::Window)] = Color(Color::Magenta).value(); + theme->color[to_underlying(Gfx::ColorRole::WindowText)] = Color(Color::Cyan).value(); m_palette_impl = Gfx::PaletteImpl::create_with_anonymous_buffer(buffer); } diff --git a/Userland/Services/WebWorker/PageHost.cpp b/Userland/Services/WebWorker/PageHost.cpp index 303a1b5f9a3..bca371587fa 100644 --- a/Userland/Services/WebWorker/PageHost.cpp +++ b/Userland/Services/WebWorker/PageHost.cpp @@ -42,8 +42,8 @@ void PageHost::setup_palette() VERIFY(!buffer_or_error.is_error()); auto buffer = buffer_or_error.release_value(); auto* theme = buffer.data(); - theme->color[to_underlying(Gfx::ColorRole::Window)] = Color::Magenta; - theme->color[to_underlying(Gfx::ColorRole::WindowText)] = Color::Cyan; + theme->color[to_underlying(Gfx::ColorRole::Window)] = Color(Color::Magenta).value(); + theme->color[to_underlying(Gfx::ColorRole::WindowText)] = Color(Color::Cyan).value(); m_palette_impl = Gfx::PaletteImpl::create_with_anonymous_buffer(buffer); }