background preloader


Related:  mood ring

D3.js - Data-Driven Documents jquery/jquery-color: jQuery plugin for color manipulation and animation support. Move.js - CSS3 animation framework for JavaScript Move.js is a small JavaScript library making CSS3 backed animation extremely simple and elegant. Move#set(prop, val) Set prop to val. Play move('#example-1 .box') .set('margin-left', 200) .end(); Move#add(prop, val) Increment prop by val, where val is an Number (click several times). move('#example-2 .box') .add('margin-left', 200) .end(); Move#sub(prop, val) Decrement prop by val, where val is an Number (click several times). move('#example-3 .box') .sub('margin-left', 100) .end(); Move#rotate(deg) Rotate by deg. move('#example-4 .box') .rotate(140) .end(); Move#duration(n) Set animation duration to n which is a Number or a string such as "4s". move('#example-5 .box') .set('background-color', 'blue') .duration('2s') .end(); Move#translate(x[, y]) Translate x and optionally y axis. move('#example-6 .box') .translate(300, 80) .end(); Move#x(n) / Move#y(n) Translate x or y axis. move('#example-7 .box') .x(300) .y(20) .end(); Move#skew(x[, y]) Skew x, and optionally y. Move#scale(x[, y]) Move#ease(fn) default in

Zoom sur l'effet parallaxe Après avoir abordé les arrière-plans extensibles (full background) nous allons continuer avec l'effet parallaxe. Cet effet graphique étant facile à comprendre et à mettre en place, vous allez pouvoir créer rapidement un site original. Ce tutoriel va utiliser jQuery ainsi que le plug-in jQuery-Parallax. Qu'est-ce que l'effet parallaxe ? Il s'agit d'un terme générique correspondant au déplacement de plusieurs éléments sur des couches et à des vitesses différentes. Au scroll (défilement de la vue) ou en fonction des coordonnées de la souris, les positions des différents fonds (ou éléments à animer) vont changer, ce qui va générer un effet de profondeur. Des exemples Utilisant le positionnement de la souris Utilisant le niveau du scroll driver-club Principe et théorie Grâce à l'utilisation de JavaScript, il est possible de déplacer les éléments par rapport à la position de la souris ou du niveau de défilement (scroll). En pratique

chroma.js api docs! chroma.js is a tiny JavaScript library (12kB) for dealing with colors! Quick-start Here are a couple of things chroma.js can do for you: read colors from a wide range of formatsanalyze and manipulate colorsconvert colors into wide range of formatslinear and bezier interpolation in different color spaces Here's an example for a simple read / manipulate / output chain: Aside from that, chroma.js can also help you generate nice colors using various methods, for instance to be used in color palette for maps or data visualizations. chroma.js has a lot more to offer, but that's the basic gist of it. chroma The first step is to get your color into chroma.js. If there's no matching named color chroma.js checks for a hexadecimal string. In addition to hex strings, hexadecimal numbers (in fact, just any number between 0 and 16777215), will be recognized, too. If you pass the RGB channels individually, too. chroma.hsl chroma.hsv chroma.lab chroma.lch L: Lightness, c: chroma (0-1), h: hue (0-1). chroma.hcl color

airbnb/javascript: JavaScript Style Guide color JavaScript library for color conversion and manipulation with support for CSS color strings. var color = ; color; console; Install Usage Setters var color = Pass any valid CSS color string into Color() or a hash of values. Set the values for individual channels with alpha, red, green, blue, hue, saturation (hsl), saturationv (hsv), lightness, whiteness, blackness, cyan, magenta, yellow, black Getters Get a hash of the rgb values with rgb(), similarly for hsl(), hsv(), and cmyk() Get an array of the values with rgbArray(), hslArray(), hsvArray(), and cmykArray(). Get the value for an individual channel. CSS Strings Different CSS String formats for the color are on hexString, rgbString, percentString, hslString, hwbString, and keyword (undefined if it's not a keyword color). Luminosity The WCAG luminosity of the color. 0 is black, 1 is white. The WCAG contrast ratio to another color, from 1 (same color) to 21 (contrast b/w white and black). Manipulation color Clone And more to come... Propers

You Might Not Need jQuery RGB color parser in JavaScript What is it A JavaScript class that accepts a string and tries to figure out a valid color out of it. Some accepted inputs are for example: rgb(0, 23, 255)#336699ffee66fb0reddarkbluecadet blue For more accepted inputs - see the demo. Here's the javascript class - rgbcolor.js. Some history / motivation I was playing around with an idea (will post later) and I needed to get color information using the so-called computed styles. In FireFox when you get a computed style, it's in the format rgb(xxx, yyy, zzz) In IE, it's #xxyyzz. I decided to take my script one step further and make the color parsing into a seperate class. The result is something you can use, among other purposes, as a friendlier user input field. How to use The class is defied in a function RGBColor(). Example use: var color = new RGBColor('darkblue'); if (color.ok) { alert(color.r + ', ' + color.g + ', ' + color.b); alert(color.toHex()); alert(color.toRGB()); } How it works All yours

JavaScript in 14 minutes by Jeremy Thomas You've created your first function! It's a simple one but it can teach you a lot. Note a few things: the name of the function is greet the parameter is called name: it's like a variable, since it acts as a container for a value we're creating a variable called message (a string) whose value is 'Hey there ' + name what this plus sign + does is concatenate (or combine) the two strings to make a single longer one we're calling the alert() function, and use the message variable as parameter after having created the function, we're calling it with the parameter 'Alex' If we break it down step by step: you typed the keyword function function greet(name) { you typed the name of the function you opened a parenthesis you created a parameter called name you closed the parenthesis you opened a curly bracket you entered a block of code that's only executed whenever the function is called var message = 'Hey there ' + name; alert(message); you closed the curly bracket greet('Alex');