• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.systemui.media.controls.ui.animation
18 
19 import com.android.systemui.monet.ColorScheme
20 
21 /** Returns the surface color for media controls based on the scheme. */
22 @Deprecated("Remove with media_controls_a11y_colors")
surfaceFromSchemenull23 internal fun surfaceFromScheme(scheme: ColorScheme) = scheme.accent2.s800 // A2-800
24 
25 /** Returns the primary accent color for media controls based on the scheme. */
26 @Deprecated("Remove with media_controls_a11y_colors")
27 internal fun accentPrimaryFromScheme(scheme: ColorScheme) = scheme.accent1.s100 // A1-100
28 
29 /** Returns the secondary accent color for media controls based on the scheme. */
30 @Deprecated("Remove with media_controls_a11y_colors")
31 internal fun accentSecondaryFromScheme(scheme: ColorScheme) = scheme.accent1.s200 // A1-200
32 
33 /** Returns the primary text color for media controls based on the scheme. */
34 @Deprecated("Remove with media_controls_a11y_colors")
35 internal fun textPrimaryFromScheme(scheme: ColorScheme) = scheme.neutral1.s50 // N1-50
36 
37 /** Returns the inverse of the primary text color for media controls based on the scheme. */
38 @Deprecated("Remove with media_controls_a11y_colors")
39 internal fun textPrimaryInverseFromScheme(scheme: ColorScheme) = scheme.neutral1.s900 // N1-900
40 
41 /** Returns the secondary text color for media controls based on the scheme. */
42 @Deprecated("Remove with media_controls_a11y_colors")
43 internal fun textSecondaryFromScheme(scheme: ColorScheme) = scheme.neutral2.s200 // N2-200
44 
45 /** Returns the tertiary text color for media controls based on the scheme. */
46 @Deprecated("Remove with media_controls_a11y_colors")
47 internal fun textTertiaryFromScheme(scheme: ColorScheme) = scheme.neutral2.s400 // N2-400
48 
49 /** Returns the color for the start of the background gradient based on the scheme. */
50 @Deprecated("Remove with media_controls_a11y_colors")
51 internal fun backgroundStartFromScheme(scheme: ColorScheme) = scheme.accent2.s700 // A2-700
52 
53 /** Returns the color for the end of the background gradient based on the scheme. */
54 @Deprecated("Remove with media_controls_a11y_colors")
55 internal fun backgroundEndFromScheme(scheme: ColorScheme) = scheme.accent1.s700 // A1-700
56 
57 internal fun backgroundFromScheme(scheme: ColorScheme) = scheme.materialScheme.getOnSurface()
58 
59 internal fun primaryFromScheme(scheme: ColorScheme) = scheme.materialScheme.getPrimaryFixed()
60 
61 internal fun onPrimaryFromScheme(scheme: ColorScheme) = scheme.materialScheme.getOnPrimaryFixed()
62