From ff7dd765ab1d3066f0cda300a6df6c03e1512809 Mon Sep 17 00:00:00 2001 From: roboli Date: Fri, 9 Sep 2022 17:28:08 -0600 Subject: [PATCH] Explain color values --- docs/api/interfaces/rgb.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/api/interfaces/rgb.md b/docs/api/interfaces/rgb.md index 6332426..afec54a 100644 --- a/docs/api/interfaces/rgb.md +++ b/docs/api/interfaces/rgb.md @@ -6,6 +6,16 @@ sidebar_label: "RGB" [pdf-lib](../index.md) › [RGB](rgb.md) +Red, Green and Blue. Each color consists of 8 bits (1 byte) having a +value which goes from 0 to 255. Therefore pdf-lib expresses colors as +fractional values between 0 and 1. You can divide each of your color +component values by 255 to produce the correct fractional value. For +example: + +``` +rgb(0 / 255, 74 / 255, 153 / 255) +``` + ## Hierarchy * **RGB**