いくつかの文字(ベース)を順番に色付けできるようにしたい。「これに色を塗る」という関数を作ることはできますが、色が何であるかはわかりません。
内部スタイルシートを使用していくつかのhsldivを作成しましたが、これは機能しないようです。
case 1: /*500-550(Raw Score)*/
$truecol=<div style="text-color: hsl($col,25%, 100%);">/*input*/</div>
break;
case 2: //550-600
$truecol=<div style="text-color: hsl($col,35%, 100%);">/*input*/</div>
break;
case 3: //600-650
$truecol=<div style="text-color: hsl($col,45%, 50%);">/*input*/</div>
break;
case 4: //650-700
$truecol=<div style="text-color: hsl($col,50%, 100%);">/*input*/</div>
break;
case 5: //700-750
$truecol=<div style="text-color: hsl($col,55%, 100%);">/*input*/</div>
break;
case 6: //750-800
$truecol=<div style="text-color: hsl($col,60%, 100%);">/*input*/</div>
break;
case 6: //800-850
$truecol=<div style="text-color: hsl($col,70%, 100%);">/*input*/</div>
break;
case 7: //850-900
$truecol=<div style="text-color: hsl($col,80%, 100%);">/*input*/</div>
break;
case 8: //900-950
$truecol=<div style="text-color: hsl($col,90%, 100%);">/*input*/</div>
break;
case 9: //950-1000
$truecol=<div style="text-color: hsl($col,100%, 100%);">/*input*/</div>
break;
rgbをhsl飽和に変換してから、16進数に戻す必要がありますか?色がグラデーションになることが重要です。これが私が最初にHSLを使用する理由です。