diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 456d175f2361..bb8bd9387619 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -19,6 +19,7 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_widget_host_view.h" #include "native_mate/dictionary.h" +#include "skia/ext/skia_utils_mac.h" #include "ui/gfx/skia_util.h" namespace { @@ -805,12 +806,8 @@ bool NativeWindowMac::IsKiosk() { } void NativeWindowMac::SetBackgroundColor(const std::string& color_name) { - SkColor background_color = ParseHexColor(color_name); - NSColor *color = [NSColor colorWithCalibratedRed:SkColorGetR(background_color) - green:SkColorGetG(background_color) - blue:SkColorGetB(background_color) - alpha:SkColorGetA(background_color)/255.0f]; - [window_ setBackgroundColor:color]; + SkColor color = ParseHexColor(color_name); + [window_ setBackgroundColor:skia::SkColorToCalibratedNSColor(color)]; } void NativeWindowMac::SetHasShadow(bool has_shadow) {