ok入力データ(テキスト)の特定の部分をハイライトするために配色を作成しました。php HSL配色:凡例を作る
しかし、私は伝説を作り、各色の意味をユーザーに伝える必要があります。入力 - は、例えば、色のラベルになります ` /入力を/
<div style="text-color: hsl($col,35%, 100%);">/*input*/</div>
<div style="text-color: hsl($col,45%, 50%);">/*input*/</div>
<div style="text-color: hsl($col,50%, 100%);">/*input*/</div>
<div style="text-color: hsl($col,55%, 100%);">/*input*/</div>
<div style="text-color: hsl($col,60%, 100%);">/*input*/</div>
<div style="text-color: hsl($col,70%, 100%);">/*input*/</div>
<div style="text-color: hsl($col,80%, 100%);">/*input*/</div>
<div style="text-color: hsl($col,90%, 100%);">/*input*/</div>
<div style="text-color: hsl($col,100%, 100%);">/*input*/</div>
` :これは私がこれまで持っているものですこれは強力な結果を意味します。 $ colは、毎回、色を変更する変数です。 0 =赤、等
私はここにある色をHTMLページ上にある凡例にする方法を知る必要があります。
お願いします。
感謝:)
に役立ちます願っています。文字列の中の変数を置き換える方法や色値を取得する方法を尋ねていますか?より具体的にしてください。 HSLの色はIE <9でサポートされていないことにも注意してください。それはCSS3だ。 – feeela