制作現場から

カラーこそ自由に選べるべきだ

 

最近自社用にシステムを構築する事があるのですが。。。

ある事で仲間からのクレームが絶えません。

 

「何故自分専用アカウントのテーマカラーが決めれないんだ!」

 

「色を自由に選べる権利を主張する!」

 

oh…..これは世界をゆるがす問題です。

 

みんな好きな色がありますよね!

好きな色が自分のカラーであってほしい!!

世界共通の願いです。はい。

そんな願いを叶えるJSを紹介しましょう!まさしく救世主

 

カラーピッカーJS

 

別に救世主だからといって光っているような名前とかいうオチでありません。

具体的には↓↓のようなカラーパレットを出してくる優れもの

 

cpick

 

カラーピッカーJSで検索すればダウンロード出来ると思うのでJSをダウンロードし解凍します。

後は放り込んでしまって

<script type=”text/javascript” src=”../html5jp/cpick.js“></script>

上記を指定してやります。

カラーピッカーを表示させたいテキストボックスにid属性とclass属性を指定します。

<input type=”text” name=”c1″ value=”#e4521e” size=”12″ id=”t1″ class=”html5jp-cpick” />

inputのvalueにカラーコードが入ります。

後はデータベースにこのコードを入れるようにプログラムを組み、cssで個別表示させれば

念願のテーマカラーをゲットできますね!!!!

 

とっても簡単ですね!

世界は救われましたぞ!

コメント

  1. hello there and thank you for your info – I have certainly picked up anything new from right
    here. I did however expertise some technical points using this website, since I experienced to reload the site many times previous to I could get
    it to load properly. I had been wondering if your web hosting is OK?
    Not that I’m complaining, but slow loading instances times will sometimes affect your
    placement in google and can damage your high-quality score if ads and marketing with Adwords.
    Anyway I’m adding this RSS to my email and can look out for much
    more of your respective interesting content. Make sure you update this again soon..
    Lista escape roomów

  2. You have noted very interesting details! ps decent website.!

関連記事

TOP