forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautogenerated_theme_util.h
31 lines (24 loc) · 1.12 KB
/
autogenerated_theme_util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2019 The Chromium Authors. All rights reserved.
// 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 = 1.3f;
constexpr float kAutogeneratedThemeActiveTabPreferredContrast = 1.6f;
constexpr float kAutogeneratedThemeActiveTabPreferredContrastForDark = 1.7f;
// Contrast between foreground and background.
constexpr float kAutogeneratedThemeTextPreferredContrast = 7.0f;
struct AutogeneratedThemeColors {
SkColor frame_color;
SkColor frame_text_color;
SkColor active_tab_color;
SkColor active_tab_text_color;
SkColor ntp_color;
};
// Generates theme colors for the given |color|.
AutogeneratedThemeColors GetAutogeneratedThemeColors(SkColor color);
#endif // CHROME_COMMON_THEMES_AUTOGENERATED_THEME_UTIL_H_