I can't set color: rgb(0,74,153)
See original GitHub issueHi, if i try to set color rgb(0,74,153) which is a strong blue, i get an error.
Uncaught (in promise) Error: green must be at least 0 and at most 1, but was actually 74
it seems to accept only values from 0 to 1. for example color: rgb (0,0,1); are ok rgb(0,74,153) are bad
I need to use color like illustrator rgb palette which is expressed with values greater than 0 and 1.
How can I solve this little problem?
Thank you
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Can someone tell me where to insert the RGB values to ...
Can someone tell me where to insert the RGB values to change the color of text? Original Title: RGB color values. Remember -...
Read more >setBackground(new color()); in java does not understand the ...
I have a program with some gui, on the JFrame I set, setBackground( new Color(107, 106, 104) ); [The problem] It gives a...
Read more >Setting Accessible RGB Values from Hex Codes in PowerPoint
PowerPoint uses RGB values for a color. RGB stands for red, greeb, ... try restarting your device. Your browser can't play this video....
Read more >MANUALLY CHANGE RGB COLORS IN FINAL CUT PRO [+ ...
Learn how to manually set RGB colors in Final Cut Pro.This helpful tutorial will guide you step-by-step so you can change, control and...
Read more >RGB Color Codes Chart - RapidTables.com
Color Name Hex Code. #RRGGBB Decimal Code. R,G,B
maroon #800000 (128,0,0)
dark red #8B0000 (139,0,0)
brown #A52A2A (165,42,42)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hello @sundsx! Good question. 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:
Not much but hope it helps https://github.com/Hopding/pdf-lib-docs/pull/39