Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace remaining rgb Color references with semantic Color assets #1414

Merged
merged 13 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed the like and repost counts from the Main and Profile feeds.
- Fixed an issue where the sheet asking users to set up a NIP-05 username would appear after reinstalling Nos, even if the profile already had a NIP-05 username.
- Fixed a bug where urls with periods after them would include the period.
- Replaced hard-coded hex color values.
- Replaced hard-coded color values.

## [0.1.24] - 2024-08-09Z

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.200",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.150",
"blue" : "0x00",
"green" : "0x00",
"red" : "0x00"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x38",
"green" : "0x63",
"red" : "0xEF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x54",
"green" : "0x4C",
"red" : "0xF2"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.250",
"blue" : "0x00",
"green" : "0x00",
"red" : "0x00"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
20 changes: 20 additions & 0 deletions Nos/Assets/Colors.xcassets/light-shadow.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.200",
"blue" : "0x00",
"green" : "0x00",
"red" : "0x00"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
4 changes: 2 additions & 2 deletions Nos/Views/ActionBanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ struct ActionBanner: View {
ZStack {
LinearGradient(
colors: [
Color(red: 1, green: 1, blue: 1, opacity: 0.2),
Color(red: 1, green: 1, blue: 1, opacity: 1.0),
Color.actionBannerBackgroundGradientTop,
Color.actionBannerBackgroundGradientBottom,
],
startPoint: .top,
endPoint: .bottom
Expand Down
10 changes: 5 additions & 5 deletions Nos/Views/BigActionButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ struct BigActionButtonStyle: ButtonStyle {
.cornerRadius(80)
.offset(y: 4.5)
.shadow(
color: Color(white: 0, opacity: 0.2),
radius: 2,
color: Color.lightShadow,
radius: 2,
x: 0,
y: configuration.isPressed ? 0 : 1
)
Expand All @@ -69,8 +69,8 @@ struct BigActionButtonStyle: ButtonStyle {
ZStack {
LinearGradient(
stops: [
Gradient.Stop(color: Color(red: 0.94, green: 0.39, blue: 0.22), location: 0.00),
Gradient.Stop(color: Color(red: 0.95, green: 0.3, blue: 0.33), location: 1.00),
Gradient.Stop(color: Color.bigActionButtonLinearGradientStop1, location: 0.00),
Gradient.Stop(color: Color.bigActionButtonLinearGradientStop2, location: 1.00),
],
startPoint: UnitPoint(x: 0.5, y: 0),
endPoint: UnitPoint(x: 0.5, y: 0.99)
Expand All @@ -86,7 +86,7 @@ struct BigActionButtonStyle: ButtonStyle {
.font(.clarity(.bold, textStyle: .title3))
.padding(15)
.shadow(
color: Color(white: 0, opacity: 0.15),
color: Color.bigActionButtonLabelShadow,
radius: 2,
x: 0,
y: 2
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Form/NosFormSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct NosFormSection<Content: View>: View {
.cornerRadius(21)
.offset(y: 4.5)
.shadow(
color: Color(white: 0, opacity: 0.2),
color: Color.lightShadow,
radius: 2,
x: 0,
y: 0
Expand Down
2 changes: 1 addition & 1 deletion Nos/Views/Profile/BioSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct BioSheet: View {
.foregroundStyle(Color.secondaryTxt)
.lineSpacing(10)
.shadow(
color: Color(white: 0, opacity: 0.25),
color: Color.bioSheetShadow,
radius: 4,
x: 0,
y: 4
Expand Down
Loading