import 'package:flutter/material.dart';

extension ColorUtils on Color {
  Color _darken([double amount = 0.1]) {
    assert(amount >= 0 && amount <= 1, 'Amount must be between 0 and 1');
    final hslColor = HSLColor.fromColor(this);
    final newLightness = (hslColor.lightness - amount).clamp(0.0, 1.0);
    final hslDarkerColor = hslColor.withLightness(newLightness);
    return hslDarkerColor.toColor();
  }

  get disabledColor{
   return withAlpha(38);
  }

  get  hoverColor{
    return _darken(0.5);
  }

  get  pressedColor{
    return _darken(0.10);
  }

}
