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頁面上。
請幫忙嗎?
謝謝:)
我已經閱讀了3次,但沒有理解你的問題。你問如何替換字符串中的變量或如何獲取顏色值?請更具體一些。另請注意,HSL顏色不支持IE <9;這就是CSS3。 – feeela 2012-04-25 12:37:33