glossyTransparent method

Color glossyTransparent(
  1. double opacity
)

Creates a true transparent color with a glossy effect. The opacity value ranges from 0.0 (completely transparent) to 1.0 (fully opaque).

Implementation

Color glossyTransparent(double opacity) {
  assert(opacity >= 0.0 && opacity <= 1.0, "Opacity must be between 0.0 and 1.0");
  return withOpacity(opacity * 0.8 + 0.2); // Adds a slight gloss factor
}