beadShades関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A marble on a line's way between its ends: the pair's colour, or for numbers the line's own soft tint, with nothing written on it.
インポート
import { beadShades } from "@johnmorrisdotca/tsunagi/draw";
定義
function beadShades(colour: TsunagiColour, marks: TsunagiMarks): { light: string; body: string; rim: string; }
引数
| 名前 | 型 | 説明 |
|---|---|---|
colour | TsunagiColour | The hue, saturation and lightness triple. |
marks | TsunagiMarks | Whether marbles show colours or numbers. |
戻り値
{ light: string; body: string; rim: string; }
A marble on a line's way between its ends: the pair's colour, or for numbers the line's own soft tint, with nothing written on it.
例
import { beadShades } from "@johnmorrisdotca/tsunagi/draw";
console.log(beadShades([120,50,40],"numbers"));{
light: 'hsl(120, 30%, 84%)',
body: 'hsl(120, 30%, 62%)',
rim: 'hsl(120, 30%, 44%)'
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。