Skip to content

Commit 3c72e64

Browse files
committed
reverse color conversion :)
1 parent 2ae3ff8 commit 3c72e64

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

.changeset/sweet-cases-pick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@kingstinct/react-native-activity-kit": patch
3+
---
4+
5+
fix color conversion

packages/react-native-activity-kit/ios/AlarmKitModule.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import NitroModules
55
func createColor(_ color: RGBColor) -> Color {
66
if let alpha = color.alpha {
77
return Color.init(
8-
red: color.red * 255,
9-
green: color.green * 255,
10-
blue: color.blue * 255,
8+
red: color.red / 255,
9+
green: color.green / 255,
10+
blue: color.blue / 255,
1111
opacity: alpha
1212
)
1313
}
1414
return Color.init(
15-
red: color.red * 255,
16-
green: color.green * 255,
17-
blue: color.blue * 255
15+
red: color.red / 255,
16+
green: color.green / 255,
17+
blue: color.blue / 255
1818
)
1919
}
2020

0 commit comments

Comments
 (0)