Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/api/interfaces/rgb.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down