Skip to content

Commit ab1be2d

Browse files
Material Engcopybara-github
authored andcommitted
Open some classes and methods as public.
PiperOrigin-RevId: 546191264
1 parent b9da62c commit ab1be2d

14 files changed

+90
-90
lines changed

swift/Sources/MaterialColorUtilities/DynamicColor/DynamicColor.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ typealias DynamicSchemeValue<T> = (DynamicScheme) -> T
3535
/// `DynamicScheme` and returns a value. This ensures ultimate flexibility, any
3636
/// desired behavior of a color for any design system, but it usually
3737
/// unnecessary. See the default constructor for more information.
38-
class DynamicColor {
39-
let name: String
38+
public class DynamicColor {
39+
public let name: String
4040
let palette: DynamicSchemeValue<TonalPalette>
4141
let tone: DynamicSchemeValue<Double>
4242
let isBackground: Bool
@@ -107,7 +107,7 @@ class DynamicColor {
107107
/// - Parameter scheme: Defines the conditions of the user interface, for example,
108108
/// whether or not it is dark mode or light mode, and what the desired contrast level is.
109109
/// - Returns: The color as an integer (ARGB).
110-
func getArgb(_ scheme: DynamicScheme) -> Int {
110+
public func getArgb(_ scheme: DynamicScheme) -> Int {
111111
return getHct(scheme).toInt()
112112
}
113113

@@ -116,7 +116,7 @@ class DynamicColor {
116116
/// contrast level is.
117117
/// - Returns: a color, expressed in the HCT color space, that this
118118
/// `DynamicColor` is under the conditions in `scheme`.
119-
func getHct(_ scheme: DynamicScheme) -> Hct {
119+
public func getHct(_ scheme: DynamicScheme) -> Hct {
120120
if let cachedAnswer = _hctCache[scheme] {
121121
return cachedAnswer
122122
}

0 commit comments

Comments
 (0)