public class Color
extends com.google.gwt.core.client.JavaScriptObject
Even though your browser understands a lot about colors, it doesn't offer much help in manipulating colors through JavaScript.
So D3 provides representations for both RGB and HSL colors, allowing interpolation in both color spaces, and making colors brighter or darker. For more about color manipulation, see the Wikipedia entries on RGB and HSL.
Note: while you can work with colors directly, you might also want to take a
look at D3's built-in D3#interpolateRgb
, D3#interpolateHsl
and D3.scale
.
If you are looking for color palettes, see the ordinal scales reference.
Modifier | Constructor and Description |
---|---|
protected |
Color() |
Modifier and Type | Method and Description |
---|---|
String |
toHexaString()
Converts to a RGB hexadecimal string, such as "#f7eaba".
|
public final String toHexaString()
Copyright © 2017 gwt-d3. All rights reserved.