We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcd46ba commit 0e42733Copy full SHA for 0e42733
lib/src/surveys/models/survey_appearance.dart
@@ -113,9 +113,9 @@ class SurveyAppearance {
113
/// Uses the HSP (Highly Sensitive Perceived) color model for perceived brightness.
114
/// This matches the algorithm used in posthog-js.
115
static Color _getContrastingTextColor(Color color) {
116
- final r = color.red;
117
- final g = color.green;
118
- final b = color.blue;
+ final r = color.r;
+ final g = color.g;
+ final b = color.b;
119
// HSP equation for perceived brightness
120
final hsp = sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b));
121
// Using 127.5 as threshold (same as JS)
0 commit comments