From bfcc8a3a75b2d21cea2988d08e315c844435c616 Mon Sep 17 00:00:00 2001 From: Nicholas Lythall Date: Fri, 28 Jun 2024 13:27:43 +1000 Subject: [PATCH] Make Hct.toInt() public The `toInt()` method of `Hct`, which returns the RGBA representation only has package visibility, where as it's other properties (e.g `hue`, `chroma`, and `tone`) are `public`. This means that when consuming this repo as a SPM dependency it's possible to create a `Hct` value from an RGBA value and modify it, but it's not possible to convert it back to an RGBA value. --- swift/Sources/MaterialColorUtilities/Hct/Hct.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/Sources/MaterialColorUtilities/Hct/Hct.swift b/swift/Sources/MaterialColorUtilities/Hct/Hct.swift index fd937114..12e6a516 100644 --- a/swift/Sources/MaterialColorUtilities/Hct/Hct.swift +++ b/swift/Sources/MaterialColorUtilities/Hct/Hct.swift @@ -115,7 +115,7 @@ public class Hct: Equatable, Hashable { return Hct(argb) } - func toInt() -> Int { + public func toInt() -> Int { return _argb }