petulla / d3-hsluv Goto Github PK
View Code? Open in Web Editor NEWD3 implementation of human-friendly HSL
License: BSD 3-Clause "New" or "Revised" License
D3 implementation of human-friendly HSL
License: BSD 3-Clause "New" or "Revised" License
This library is an exciting development!
@petulla Once you feel it's ready for prime time, I suggest we add it to https://github.com/wbkd/awesome-d3
I started off some typings, would love to see this updated and typed :)
declare module "d3-hsluv" {
import type { ColorSpaceObject, ColorCommonInstance } from "@d3-color"
/**
* Parses the specified CSS Color Module Level 3 specifier string, returning an RGB color.
* If the specifier was not valid, null is returned.
* See: http://www.w3.org/TR/css3-color/#colorunits
*
* @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
*/
export function hsluv(cssColorSpecifier: string): RGBColor
/**
* Converts the provided color instance and returns an RGB color. The color instance is converted to the RGB color space using color.rgb.
* Note that unlike color.rgb this method always returns a new instance, even if color is already an RGB color.
*
* @param color A permissible color space instance.
*/
export function hsluv(color: ColorSpaceObject | ColorCommonInstance): RGBColor
/** l, u, v, and optional opacity channels */
export function hsluv(l: number, u: number, v: number, opacity?: number): void
/** returns an HSLuv color space interpolator between the two colors a and b */
export function interpolateHsluv(color1: string, color2: string): void
/**
* Returns an HSLuv color space interpolator between the two colors a and b,
* but does not use the shortest path between hues.
*/
export function interpolateHsluvLong(color1: string, color2: string): void
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.