From 443492bd365b94470bbd75f06a556025482d38e9 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Thu, 6 Jan 2022 22:05:37 +0900 Subject: 2021/08/13 時点の英語版に同期 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/css/filter-function/grayscale()/index.md | 59 ++++++++++++++-------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/files/ja/web/css/filter-function/grayscale()/index.md b/files/ja/web/css/filter-function/grayscale()/index.md index 2f5eb6f89c..520fe781fc 100644 --- a/files/ja/web/css/filter-function/grayscale()/index.md +++ b/files/ja/web/css/filter-function/grayscale()/index.md @@ -3,40 +3,57 @@ title: grayscale() slug: Web/CSS/filter-function/grayscale() tags: - CSS - - CSS Function - CSS 関数 - - Filter Effects - - Reference - フィルター効果 + - 関数 + - リファレンス +browser-compat: css.types.filter-function.grayscale translation_of: Web/CSS/filter-function/grayscale() --- -
{{cssref}}
+{{CSSRef}} -

CSSgrayscale() 関数は、入力画像をグレースケールに変換します。結果は {{cssxref("<filter-function>")}} です。

+**`grayscale()`** は [CSS](/ja/docs/Web/CSS) の関数は、入力画像をグレースケールに変換します。結果は {{cssxref("<filter-function>")}} です。 -
{{EmbedInteractiveExample("pages/css/function-grayscale.html")}}
+{{EmbedInteractiveExample("pages/css/function-grayscale.html")}} - +## 構文 -

構文

+```css +grayscale(amount) +``` -
grayscale(amount)
+### 引数 -

引数

+- `amount` + - : 変換の度合いで、 {{cssxref("<number>")}} または {{cssxref("<percentage>")}} で指定します。 `100%` の値では完全にグレースケールになり、 `0%` の値では入力が変更されないままになります。 `0%` と `100%` の間の値は、効果の割合です。省略時の既定値は `1` です。補間時の欠損値は `0` です。 -
-
amount
-
変換の度合いで、 {{cssxref("<number>")}} 又は {{cssxref("<percentage>")}} で指定します。 100% の値では完全にグレースケールになり、 0% の値では入力が変更されないままになります。 0%100% の間の値は、効果の割合です。補間時の欠損値は 0 です。
-
+## 例 -

+### grayscale() の正しい値の例 -
grayscale(0)     /* 効果なし */
+```css
+grayscale(0)     /* 効果なし */
 grayscale(.7)    /* 70% グレースケール */
-grayscale(100%)  /* 完全なグレースケール */
+grayscale(100%) /* 完全なグレースケール */ +``` -

関連情報

+## 仕様書 - +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} + +## 関連情報 + +- {{cssxref("<filter-function>")}} +- {{cssxref("filter-function/blur()", "blur()")}} +- {{cssxref("filter-function/brightness()", "brightness()")}} +- {{cssxref("filter-function/contrast()", "contrast()")}} +- {{cssxref("filter-function/drop-shadow()", "drop-shadow()")}} +- {{cssxref("filter-function/hue-rotate()", "hue-rotate()")}} +- {{cssxref("filter-function/invert()", "invert()")}} +- {{cssxref("filter-function/opacity()", "opacity()")}} +- {{cssxref("filter-function/saturate()", "saturate()")}} +- {{cssxref("filter-function/sepia()", "sepia()")}} -- cgit v1.2.3-54-g00ecf