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

Color safeSum in forest green as used in the Grayson Dot #535

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

krugerk
Copy link
Contributor

@krugerk krugerk commented Dec 2, 2024

Summary

The chart includes the Grayson Dot - a different color green applied to green dots with more than 7d buffer. The iOS app colors the safeSum using colors based on the colors of the dots. This text appears in both the gallery in a goal's cell as well as in the goal screen itself. Previously the same green was being used for all safeSum with a safeBuf greater than three.

Validation

Ran app in the simulator using the new colors and logic. Made screenshots.

grayson-green-for-safety-buffer-more-than-seven-on-dark

Fixes #206

replaces if else with a switch for increased legibility
Copy link
Collaborator

@theospears theospears left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The color parts of this look good. Less sure about the change to gray.

public static let red: UIColor = .systemRed

public static let gray = UIColor(white: 0.7, alpha: 1.0)
public static let gray = UIColor.systemGray
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is a somewhat darker color than the previous one (more like white: 0.5). Was that deliberate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The system gray one will adapt to the device's environment whereas the white 0.7 with alpha 1.0 one will not.
And since the app does not use the exact same colors the website uses for the dots, picking something easier to read (better contrast) instead, this MR does the same with the gray.

before

before - buttons-white0 7-on-dark
before - buttons-white0 7-on-light
before - last updated-white0 7-on-dark
before - last updated-white0 7-on-light

after

after - buttons-systemgray-on-dark
after - buttons-systemgray-on-light
after - last updated-systemgray-on-dark
after - last updated-systemgray-on-light

Copy link
Collaborator

@theospears theospears Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The system gray one will adapt to the device's environment

I agree this is true in abstract, and for most system colors. It turns out systemGray is the same in both dark mode and light mode.

I'm not convinced having this universal gray really makes sense (e.g. perhaps backgrounds should be closer to the background color than borders are), but that seems like a problem for another day.

@theospears theospears merged commit e4ccd60 into beeminder:master Dec 2, 2024
1 check passed
@krugerk krugerk deleted the feature/206-grayson-dot branch December 2, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use consistent color scheme based on safety buffer (safebuf)
2 participants