chromium/chrome/common/themes/autogenerated_theme_util.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_COMMON_THEMES_AUTOGENERATED_THEME_UTIL_H_
#define CHROME_COMMON_THEMES_AUTOGENERATED_THEME_UTIL_H_

#include "third_party/skia/include/core/SkColor.h"

// Constants for autogenerated themes.
// Minimum contrast for active tab and frame color to avoid isolation line in
// the tab strip.
constexpr float kAutogeneratedThemeActiveTabMinContrast =;
constexpr float kAutogeneratedThemeActiveTabPreferredContrast =;
constexpr float kAutogeneratedThemeActiveTabPreferredContrastForDark =;

// Contrast between foreground and background.
constexpr float kAutogeneratedThemeTextPreferredContrast =;

struct AutogeneratedThemeColors {};

// Generates theme colors for the given `color`.
AutogeneratedThemeColors GetAutogeneratedThemeColors(SkColor color);

// Calculates a contrasting color for a given `color` by changing the color's
// luminance. Returns a lighter color if the color is very dark or a darker
// color otherwise.
SkColor GetContrastingColor(SkColor color, float luminosity_change);

#endif  // CHROME_COMMON_THEMES_AUTOGENERATED_THEME_UTIL_H_