diff --git a/packages/adapter/functions/_helpers.scss b/packages/adapter/functions/_helpers.scss index 6a179ab..dd0cbcb 100644 --- a/packages/adapter/functions/_helpers.scss +++ b/packages/adapter/functions/_helpers.scss @@ -409,6 +409,8 @@ } /// (未使用?) +/// TODO: 自己再帰による無限ループと、Sass 1.85+ で非推奨の if() を含んでいる。 +/// 削除したいが、残っている理由があるのかもしれないので確認する。 /// /// @group helper @function get-foreground-brightness($background-color) { @@ -468,9 +470,9 @@ $available-hexadecimal-chars: "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", /// 輝度を計算する /// 参考: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests @function -compose-luminance($color) { - $red: -compose-linear-channel-value(color.red($color)); - $green: -compose-linear-channel-value(color.green($color)); - $blue: -compose-linear-channel-value(color.blue($color)); + $red: -compose-linear-channel-value(color.channel($color, "red", $space: rgb)); + $green: -compose-linear-channel-value(color.channel($color, "green", $space: rgb)); + $blue: -compose-linear-channel-value(color.channel($color, "blue", $space: rgb)); @return 0.2126 * $red + 0.7152 * $green + 0.0722 * $blue; }