色相を求める計算
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2022/05/01 02:57 UTC 版)
CIELABから: tan H = b ∗ a ∗ {\displaystyle \tan H={\frac {b^{*}}{a^{*}}}} CIELUVから: tan H = v ∗ u ∗ = v ′ u ′ {\displaystyle \tan H={\frac {v^{*}}{u^{*}}}={\frac {v'}{u'}}} RGBから: tan H = 3 ( G − B ) 2 R − G − B {\displaystyle \tan H={\frac {{\sqrt {3}}(G-B)}{2R-G-B}}} 逆三角関数が使えないときは、次の式で大まかな値を求めることもできる。 大小関係色相の範囲公式1公式2角度 R ≥ G ≥ B {\displaystyle R\geq G\geq B} 赤~黄色 H = 60 ∘ × G − B R − B {\displaystyle H=60^{\circ }\times {\frac {G-B}{R-B}}} H = 60 ∘ × G − B R − B {\displaystyle H=60^{\circ }\times {\frac {G-B}{R-B}}} 0°~60° G ≥ R ≥ B {\displaystyle G\geq R\geq B} 黄色~緑 H = 60 ∘ × ( 2 − R − B G − B ) {\displaystyle H=60^{\circ }\times \left(2-{\frac {R-B}{G-B}}\right)} H = 60 ∘ × ( 1 + G − R G − B ) {\displaystyle H=60^{\circ }\times \left(1+{\frac {G-R}{G-B}}\right)} 60°~120° G ≥ B ≥ R {\displaystyle G\geq B\geq R} 緑~シアン H = 60 ∘ × ( 2 + B − R G − R ) {\displaystyle H=60^{\circ }\times \left(2+{\frac {B-R}{G-R}}\right)} H = 60 ∘ × ( 2 + B − R G − R ) {\displaystyle H=60^{\circ }\times \left(2+{\frac {B-R}{G-R}}\right)} 120°~180° B ≥ G ≥ R {\displaystyle \ B\geq G\geq R\ } シアン~青 H = 60 ∘ × ( 4 − G − R B − R ) {\displaystyle H=60^{\circ }\times \left(4-{\frac {G-R}{B-R}}\right)} H = 60 ∘ × ( 3 + B − G B − R ) {\displaystyle H=60^{\circ }\times \left(3+{\frac {B-G}{B-R}}\right)} 180°~240° B ≥ R ≥ G {\displaystyle B\geq R\geq G} 青~マゼンタ H = 60 ∘ × ( 4 + R − G B − G ) {\displaystyle H=60^{\circ }\times \left(4+{\frac {R-G}{B-G}}\right)} H = 60 ∘ × ( 4 + R − G B − G ) {\displaystyle H=60^{\circ }\times \left(4+{\frac {R-G}{B-G}}\right)} 240°~300° R ≥ B ≥ G {\displaystyle R\geq B\geq G} マゼンタ~赤 H = 60 ∘ × ( 6 − B − G R − G ) {\displaystyle H=60^{\circ }\times \left(6-{\frac {B-G}{R-G}}\right)} H = 60 ∘ × ( 5 + R − B R − G ) {\displaystyle H=60^{\circ }\times \left(5+{\frac {R-B}{R-G}}\right)} 300°~360° R = B = G {\displaystyle R=B=G} 無彩色 未定義 未定義 未定義 最大値公式最小値公式 M a x = R {\displaystyle Max=R} H = 60 ∘ × G − B M a x − M i n {\displaystyle H=60^{\circ }\times {\frac {G-B}{Max-Min}}} M i n = B {\displaystyle Min=B} H = 60 ∘ × ( 1 + G − R M a x − M i n ) {\displaystyle H=60^{\circ }\times \left(1+{\frac {G-R}{Max-Min}}\right)} M a x = G {\displaystyle Max=G} H = 60 ∘ × ( 2 + B − R M a x − M i n ) {\displaystyle H=60^{\circ }\times \left(2+{\frac {B-R}{Max-Min}}\right)} M i n = R {\displaystyle Min=R} H = 60 ∘ × ( 3 + B − G M a x − M i n ) {\displaystyle H=60^{\circ }\times \left(3+{\frac {B-G}{Max-Min}}\right)} M a x = B {\displaystyle Max=B} H = 60 ∘ × ( 4 + R − G M a x − M i n ) {\displaystyle H=60^{\circ }\times \left(4+{\frac {R-G}{Max-Min}}\right)} M i n = G {\displaystyle Min=G} H = 60 ∘ × ( 5 + R − B M a x − M i n ) {\displaystyle H=60^{\circ }\times \left(5+{\frac {R-B}{Max-Min}}\right)} M a x = M i n {\displaystyle Max=Min} 未定義 M a x = M i n {\displaystyle Max=Min} 未定義 N公式 N mod 2 = 0 {\displaystyle N\mod 2=0} H = 60 ∘ × ( N + M e d i a n − M i n M a x − M i n ) {\displaystyle H=60^{\circ }\times \left(N+{\frac {Median-Min}{Max-Min}}\right)} N mod 2 = 1 {\displaystyle N\mod 2=1} H = 60 ∘ × ( N + M a x − M e d i a n M a x − M i n ) = 60 ∘ × ( ( N + 1 ) − M e d i a n − M i n M a x − M i n ) {\displaystyle H=60^{\circ }\times \left(N+{\frac {Max-Median}{Max-Min}}\right)=60^{\circ }\times \left((N+1)-{\frac {Median-Min}{Max-Min}}\right)} N = 未定義 H = 未定義 M a x = R , M i n = B {\displaystyle Max=R,Min=B} N = 0 {\displaystyle N=0} M a x = G , M i n = B {\displaystyle Max=G,Min=B} N = 1 {\displaystyle N=1} M a x = G , M i n = R {\displaystyle Max=G,Min=R} N = 2 {\displaystyle N=2} M a x = B , M i n = R {\displaystyle Max=B,Min=R} N = 3 {\displaystyle N=3} M a x = B , M i n = G {\displaystyle Max=B,Min=G} N = 4 {\displaystyle N=4} M a x = R , M i n = G {\displaystyle Max=R,Min=G} N = 5 {\displaystyle N=5} M a x = M i n {\displaystyle Max=Min} N = 未定義
※この「色相を求める計算」の解説は、「色相」の解説の一部です。
「色相を求める計算」を含む「色相」の記事については、「色相」の概要を参照ください。
- 色相を求める計算のページへのリンク