RuKoder.ru RUKODER.ru
05 ЯНВ 2015
0

chroma.js - скрипт для всех видов преобразования цвета и цветовых гамм.

JavaScript
Initiate and manipulate colors:
chroma('#D4F880').darken().hex(); // #9BC04B

Working with color scales is easy, too:
scale = chroma.scale(['white', 'red']);
scale(0.5).hex(); // #FF7F7F

Lab/Lch interpolation looks better than than RGB
chroma.scale(['white', 'red']).mode('lab');

Custom domains! Quantiles! Color Brewer!!
chroma.scale('RdYlBu').domain(myValues, 7, 'quantiles');

And why not use logarithmic color scales once in your life?
chroma.scale(['lightyellow', 'navy']).domain([1, 100000], 7, 'log');

https://github.com/gka/chroma.js

Добавить комментарий

Категории:

  • CSS (121)
  • PHP (301)
  • JavaScript (704)

Оставить на заметку в:

© 2026 RuKoder.ru