toneAllowsLightForeground static method

bool toneAllowsLightForeground(
  1. double tone
)

Returns whether tone can reach a contrast ratio of 4.5 with a lighter color.

Implementation

static bool toneAllowsLightForeground(double tone) {
  return tone.round() <= 49;
}