From fc321b35351b7ed47a2192911bfa6f3b9230f6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Thu, 19 May 2022 16:59:05 +0200 Subject: [PATCH] document color.formatHex8 following #103 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a7f2d52..7c8fefd 100644 --- a/README.md +++ b/README.md @@ -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. +# *color*.formatHex8() [<>](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. + # *color*.formatHsl() [<>](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].