Skip to content
Permalink
Browse files

fix helper

  • Loading branch information...
codebytere committed Jan 3, 2019
1 parent 5efc064 commit aa454992bcf47e4134b9e23a21332cbda509c2c7
Showing with 5 additions and 4 deletions.
  1. +5 −4 atom/browser/api/atom_api_system_preferences_mac.mm
@@ -106,10 +106,11 @@ AVMediaType ParseMediaType(const std::string& media_type) {
}

// Convert color to RGBA value like "#ABCDEF"
std::string ToRGBHex(NSColor* color) {
return base::StringPrintf("#%02X%02X%02X", (int)(color.redComponent * 0xFF),
(int)(color.greenComponent * 0xFF),
(int)(color.blueComponent * 0xFF));
std::string ToRGBA(NSColor* color) {
return base::StringPrintf(
"%02X%02X%02X%02X", (int)(color.redComponent * 0xFF),
(int)(color.greenComponent * 0xFF), (int)(color.blueComponent * 0xFF),
(int)(color.alphaComponent * 0xFF));
}
} // namespace

0 comments on commit aa45499

Please sign in to comment.
You can’t perform that action at this time.