You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Sorting colors in JavaScriptJune 22, 2021How to sort colors in JavaScript? Let me tell you a story first. In the project I'm working on right now we used to have 134 colors in use! WTF?! you say. Once I discovered that I thought I'm going to show that to my colleagues, and we will address the problem. Unfortunately, I'm a very visual person (so to say) and I couldn't stand the very random order of
kolor is a useful color manipulation tool in JavaScript. It provides color string parsing, format converting and basic color adjusting methods. Supported color formats: RGB(A) HSL(A) HSV(A) # Usage Vanilla JS Just include kolor.js in your HTML document: <script src="kolor.js"></script> Core functionalities are provided by the kolor object in global scope. Working with RequireJS (or other AMD compa
Participate in our anonymous Starting Web App Research 2025 & Get 10 Credits🔥 It only takes 3 minutes!🚀 Generate production-ready web apps - with frontend, backend, database, authentication, roles - instantly deployed to the Cloud using plain English. You own source-code - total control, zero dependencies. Professional workflow built-in (version control, dual environments). Ideal for startups an
This is javascript for the Fisher-Yates shuffle, which I took from this StackOverflow question. Screenshot from Sublime Text 2 with the Dawn theme.We think syntax highlighting makes the structure of code easier to understand. But as it stands, we highlight the obvious (like the word function) and leave most of the content in black. Rather than highlighting the differences between currentIndex and
Scaleable color picker (MIT). View the Project on GitHub bebraw/colorjoe Download ZIP File Download TAR Ball View On GitHub Unlike many other colorpickers out there, colorjoe is truly scaleable. It is based on CSS and does not depend on external images. As a result, you can tweak its size to fit your purposes. Supports touch and AMD module definition as well. Study the source of this page to get s
JavaScript おれおれ Advent Calendar 2011 – 8日目 CSSで色を表現する方法の一つにカラーコードというものがありまして、#55CC2Aみたいな感じで色を表現できますね。光の三原色RGB (Red, Green, Blue)を2桁の16進数で表現して連結したものです。 これをJavaScriptから扱うなら、そのまま16進数で0x55CC2Aみたいに扱うと見た目が似ていて楽チンそうです。(ちなみにアルファベットは大文字でも小文字でも可。) この中から一色分だけ取得したりするには、ビット演算でムニャムニャするのが良いです。 (あるいはrgb()の形の表現でも良いでしょう。) 先に結論 // 取得 var code = 0x55cc2a; var red = code >> 16; // => 0x55 var green = code >> 8 & 0xff;
ペイントでパレットにない色を作成するとき開く画面がありますよね。カラフルなあれです。カラーピッカーって言うらしいですが...、あれをJavaScriptを使って再現しようと思います。使う知識はHSVとRGBについての知識で、RGBは文字通りRed、Blue、Greenですが、HSVとは何でしょう?僕も初めて知ったのですが、Hue、Saturation、Valueの頭文字で、それぞれ色相、彩度、明度のことらしいです。ペイントで使っているのはHSVとはちょっとばかし違うようですが、まぁ細かいことは気にせずやっていきたいと思います。さてさて問題なのはペイントではHSVで色を表していますが、HTMLではRGB(16進数で例えば#FF0000は赤)でしか表せない点ですね。よってHSVからRGBへと変換しなければなりません。そこでまずはHSVについてお勉強しましょう。 HSVはそれぞれ以下のように定
JavaScript(jQuery)を使って画像をフェードさせていたところ、 フェード中のいくつかの画像に白い点々が出ているのを見つけました。 (ディスプレイのドット落ちのような・・) 調べてみたところIEのバグのようです。 いろいろな方の記事で書かれているのを見ると、 発生条件は以下のような感じ。 ・JavaScript の filter:alpha(opacity); を使用 ・JPEG画像を使用 ・#02050a の色を使用 要するに、#02050a を含むJPEG画像をJSで透過させると、 #02050a の箇所だけが完全に透過JPEGになってしまう、 というバグのようです。IEのみ。 解決策としては 1. PNG画像などにする 2. #02050a を使わない 3. 背景色を #02050a にする となりますが、 何故かPNG画像にしただけでは直らず・・ 結局、PNG画像 +
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く