Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/adapter/functions/_helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@
}

/// (未使用?)
/// TODO: 自己再帰による無限ループと、Sass 1.85+ で非推奨の if() を含んでいる。
/// 削除したいが、残っている理由があるのかもしれないので確認する。
///
/// @group helper
@function get-foreground-brightness($background-color) {
Expand Down Expand Up @@ -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;
}
Expand Down
Loading