リファレンス saturation()

saturation()

色の彩度の値を取得します。

saturation()p5.Colorオブジェクト、色成分の配列、 またはCSSの色文字列から彩度の値を抽出します。

彩度はHSBとHSLで異なる方法でスケーリングされます。デフォルトでは、saturation()は 色のHSLの彩度を0から100の範囲で返します。colorMode()が HSBまたはHSLに設定されている場合、指定されたモードでの彩度の値を返します。

実例

シンタックス

saturation(color)

パラメーター

color
p5.Color|Number[]|String:

p5.Colorオブジェクト、色成分の配列、 またはCSS色文字列。

リターン

Number: 彩度の値
Notice any errors or typos? Please let us know. Please feel free to edit src/color/creating_reading.js and open a pull request!

関連するリファレンス