getBlockColor method
Implementation
Color getBlockColor(int barIndex, int blockIndex, int maxBlocks) {
final hue = (barIndex / dataLength) * 360;
const lightnessRange = 0.1;
final lightness = 0.6 +
(blockIndex / maxBlocks * lightnessRange).clamp(0.0, lightnessRange);
return HSLColor.fromAHSL(1, hue, 0.8, lightness).toColor();
}