#include "ui/color/color_transform.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/color/color_mixer.h"
#include "ui/color/color_provider_utils.h"
namespace ui {
ColorTransform::ColorTransform(Callback callback)
: … { … }
ColorTransform::ColorTransform(SkColor color) : … { … }
ColorTransform::ColorTransform(ColorId id) : … { … }
ColorTransform::ColorTransform(const ColorTransform&) = default;
ColorTransform& ColorTransform::operator=(const ColorTransform&) = default;
ColorTransform::~ColorTransform() = default;
SkColor ColorTransform::Run(SkColor input_color,
const ColorMixer& mixer) const { … }
ColorTransform AlphaBlend(ColorTransform foreground_transform,
ColorTransform background_transform,
SkAlpha alpha) { … }
ColorTransform BlendForMinContrast(
ColorTransform foreground_transform,
ColorTransform background_transform,
std::optional<ColorTransform> high_contrast_foreground_transform,
float contrast_ratio) { … }
ColorTransform BlendForMinContrastWithSelf(ColorTransform transform,
float contrast_ratio) { … }
ColorTransform BlendTowardMaxContrast(ColorTransform transform, SkAlpha alpha) { … }
ColorTransform ContrastInvert(ColorTransform transform) { … }
ColorTransform DeriveDefaultIconColor(ColorTransform transform) { … }
ColorTransform FromTransformInput() { … }
ColorTransform GetColorWithMaxContrast(ColorTransform transform) { … }
ColorTransform GetEndpointColorWithMinContrast(ColorTransform transform) { … }
ColorTransform GetResultingPaintColor(ColorTransform foreground_transform,
ColorTransform background_transform) { … }
ColorTransform SelectBasedOnDarkInput(
ColorTransform input_transform,
ColorTransform output_transform_for_dark_input,
ColorTransform output_transform_for_light_input) { … }
ColorTransform SetAlpha(ColorTransform transform, SkAlpha alpha) { … }
ColorTransform PickGoogleColor(ColorTransform foreground_transform,
ColorTransform background_transform,
float min_contrast,
float max_contrast) { … }
ColorTransform PickGoogleColorTwoBackgrounds(
ColorTransform foreground_transform,
ColorTransform background_a_transform,
ColorTransform background_b_transform,
float min_contrast,
float max_contrast_against_nearer) { … }
ColorTransform HSLShift(ColorTransform color, color_utils::HSL hsl) { … }
}