color_util.h 533 B

1234567891011121314151617181920212223
  1. // Copyright (c) 2016 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ATOM_COMMON_COLOR_UTIL_H_
  5. #define ATOM_COMMON_COLOR_UTIL_H_
  6. #include <string>
  7. #include "third_party/skia/include/core/SkColor.h"
  8. namespace atom {
  9. // Parse hex color like "#FFF" or "#EFEFEF"
  10. SkColor ParseHexColor(const std::string& name);
  11. // Convert color to RGB hex value like "#ABCDEF"
  12. std::string ToRGBHex(SkColor color);
  13. } // namespace atom
  14. #endif // ATOM_COMMON_COLOR_UTIL_H_