Skip to content

Commit

Permalink
document color.formatHex8
Browse files Browse the repository at this point in the history
following #103
  • Loading branch information
Fil committed May 19, 2022
1 parent 7a1573e commit fc321b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -132,6 +132,10 @@ Returns true if and only if the color is displayable on standard hardware. For e

Returns a hexadecimal string representing this color in RGB space, such as `#f7eaba`. If this color is not displayable, a suitable displayable color is returned instead. For example, RGB channel values greater than 255 are clamped to 255.

<a name="color_formatHex8" href="#color_formatHex8">#</a> *color*.<b>formatHex8</b>() [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source")

Returns a hexadecimal string representing this color in RGBA space, such as `#f7eaba90`. If this color is not displayable, a suitable displayable color is returned instead. For example, RGB channel values greater than 255 are clamped to 255.

<a name="color_formatHsl" href="#color_formatHsl">#</a> *color*.<b>formatHsl</b>() [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source")

Returns a string representing this color according to the [CSS Color Module Level 3 specification](https://www.w3.org/TR/css-color-3/#hsl-color), such as `hsl(257, 50%, 80%)` or `hsla(257, 50%, 80%, 0.2)`. If this color is not displayable, a suitable displayable color is returned instead by clamping S and L channel values to the interval [0, 100].
Expand Down

0 comments on commit fc321b3

Please sign in to comment.