mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
9d08e2afae
Summary: Trivial. We have a special data structure for it, why do not use it here? Reviewed By: mdvacca Differential Revision: D7738577 fbshipit-source-id: 750aa649b06f17d27906d44df07172a907cde2e5
31 lines
634 B
C++
31 lines
634 B
C++
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <CoreGraphics/CoreGraphics.h>
|
|
#include <memory>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
using Color = CGColor;
|
|
using SharedColor = std::shared_ptr<Color>;
|
|
|
|
struct ColorComponents {
|
|
float red {0};
|
|
float green {0};
|
|
float blue {0};
|
|
float alpha {0};
|
|
};
|
|
|
|
SharedColor colorFromComponents(ColorComponents components);
|
|
ColorComponents colorComponentsFromColor(SharedColor color);
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|