2
カラーパレットで使用できるSVGグラフィックスを使用してRGBカラーモデルを描画したいと考えています。勾配のSVGグラフィックスを使用してRGBカラーピッカーグラデーションを描画する方法
画像がhere
- を閲覧することができ、私はSVGを使用してグラデーションを描画しようとしましたが、期待通りの結果ではありません。
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width=256 height=256 >
<defs>
<linearGradient id='magenta' x1=0% y1=0% x2=100% y2=100%>
<stop offset= 0% stop-color=#FF00FF stop-opacity=1></stop>
<stop offset= 100% stop-color=#FFFFFF stop-opacity=0></stop>
</linearGradient>
<linearGradient id='blue' x1=100% y1=0% x2=0% y2=100%>
<stop offset= 0% stop-color=#0000FF stop-opacity=1></stop>
<stop offset= 100% stop-color=#FFFFFF stop-opacity=0></stop>
</linearGradient>
<linearGradient id='red' x1=0% y1=100% x2=100% y2=0%>
<stop offset= 0% stop-color=#FF0000 stop-opacity=1></stop>
<stop offset= 100% stop-color=#FFFFFF stop-opacity=0></stop>
</linearGradient>
<linearGradient id='black' x1=100% y1=100% x2=0% y2=0%>
<stop offset= 0% stop-color=#000000 stop-opacity=1></stop>
<stop offset= 100% stop-color=#FFFFFF stop-opacity=0></stop>
</linearGradient>
</defs>
<rect x=0 y=0 width=100% height=100% fill="url(#magenta)"></rect>
<rect x=0 y=0 width=100% height=100% fill="url(#blue)"></rect>
<rect x=0 y=0 width=100% height=100% fill="url(#red)"></rect>
<rect x=0 y=0 width=100% height=100% fill="url(#black)"></rect>
</svg>
This postそれはCSSを使用して行うことができる方法を説明します。 SVG Graphicsを使ってこのグラデーションを描く方法を知りたい。
ちょうど試してみてくださいhttp://www.colorzilla.com/gradient-editor/ – vivek
[4コーナーカラーのCSS3グラデーションを作成する]の可能な複製(http://stackoverflow.com/questions/18452885/building- a-4コーナーカラー-Css3グラジエント) – vivek