changeShade function

int changeShade(
  1. int rgb,
  2. double shade
)

Converts individual red, green, or blue of an input color to match a specific lightness shade rgb Red, green or blue color value of the initial color shade Shade from 0-1

Implementation

int changeShade(int rgb, double shade) => rgb + ((255 - rgb) * shade).floor();