marbleShadesfunction
A marble's shading: the highlight at its upper left, its body, and its rim, and the ink its number is written in.
Import it
import { marbleShades } from "@johnmorrisdotca/tsunagi/draw";
Definition
function marbleShades(colour: TsunagiColour, marks: TsunagiMarks): { light: string; body: string; rim: string; ink: string; }
Parameters
| Name | Type | Description |
|---|---|---|
colour | TsunagiColour | The hue, saturation and lightness triple. |
marks | TsunagiMarks | Whether marbles show colours or numbers. |
Returns
{ light: string; body: string; rim: string; ink: string; }
A marble's shading: the highlight at its upper left, its body, and its rim, and the ink its number is written in.
Examples
import { marbleShades } from "@johnmorrisdotca/tsunagi/draw";
console.log(marbleShades([120,50,40],"colours"));{
light: 'hsl(120, 50%, 68%)',
body: 'hsl(120, 50%, 40%)',
rim: 'hsl(120, 50%, 18%)',
ink: '#ffffff'
}What it prints (run when this page was built)