stone function

StoneColors stone(
  1. Object col
)

Stone shades for rocks, grit and dust from one body color.

Implementation

StoneColors stone(Object col) {
  final c = col is int ? col : hex(col as String);
  return StoneColors(
    light: mix(scaleColor(c, 1.35), kWhite, 0.08),
    body: c,
    shade: scaleColor(c, 0.64),
    dust: mix(scaleColor(c, 1.2), rgb(150, 140, 150), 0.3),
    dark: scaleColor(c, 0.42),
  );
}