Skip to content

Commit 35c104a

Browse files
committed
internalize extensions to Color
The initializers `init(rgba:)` and `init(light:dark:)`, introduced in #168 are very useful, but should be `internal`. Marked as `public`, these functions are liable to cause conflicts with other packages. The potential for conflict is heightened by the functions' utility and the intuitive name.
1 parent a9c7615 commit 35c104a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/MarkdownUI/Utility/Color+RGBA.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import SwiftUI
33
extension Color {
44
/// Creates a constant color from an RGBA value.
55
/// - Parameter rgba: A 32-bit value that represents the red, green, blue, and alpha components of the color.
6-
public init(rgba: UInt32) {
6+
init(rgba: UInt32) {
77
self.init(
88
red: CGFloat((rgba & 0xff00_0000) >> 24) / 255.0,
99
green: CGFloat((rgba & 0x00ff_0000) >> 16) / 255.0,
@@ -16,7 +16,7 @@ extension Color {
1616
/// - Parameters:
1717
/// - light: The light appearance color value.
1818
/// - dark: The dark appearance color value.
19-
public init(light: @escaping @autoclosure () -> Color, dark: @escaping @autoclosure () -> Color) {
19+
init(light: @escaping @autoclosure () -> Color, dark: @escaping @autoclosure () -> Color) {
2020
#if os(watchOS)
2121
self = dark()
2222
#elseif canImport(UIKit)

0 commit comments

Comments
 (0)