Setting font colors, semi-transparent colors and watermarks
You can easily set transparency for text color when adding to existing pdf and create semitransparent colors with pdf/edit/add
for added text objects.
Semi transparent text is useful when you need to add text to existing PDF document and make it look like it was printed on the original document or when you need to add a watermark to the PDF document.
Common colors
Color Name | Hex Value |
---|---|
Black | #000000 |
White | #FFFFFF |
Gray | #808080 |
Silver | #C0C0C0 |
Maroon | #800000 |
Red | #FF0000 |
Olive | #808000 |
Yellow | #FFFF00 |
Green | #008000 |
Lime | #00FF00 |
Teal | #008080 |
Aqua | #00FFFF |
Blue | #0000FF |
Navy | #000080 |
Purple | #800080 |
Fuchsia | #FF00FF |
Orange | #FFA500 |
Coral | #FF7F50 |
Turquoise | #40E0D0 |
Indigo | #4B0082 |
Gold | #FFD700 |
Plum | #DDA0DD |
Chocolate | #D2691E |
Slate Gray | #708090 |
Medium Sea Green | #3CB371 |
Creating semi-transparent watermarks
To create semitransparent watermarks, use AA
component of color in color
property. All colors can be in HEX format as #RRGGBB
or #AARRGGBB
(where AA
is transparency component).
Set transparency for text color
To set transparency / opacity level for color when adding text to existing pdf, use AA
component of color in the color
property. All colors can be in HEX format as #RRGGBB
or #AARRGGBB
(where AA
is transparency component).
In HTML colors, the opacity component is specified using an alpha value in hexadecimal notation, which is represented by the first two digits of an eight-digit color code. The alpha value determines the level of transparency or opacity of the color.
Here’s how the alpha value works:
The alpha value ranges from 00
to FF
, where 00
represents full transparency (i.e., the color is completely invisible), and FF represents full opacity (i.e., the color is completely visible).
The alpha value can be thought of as a measure of how much the color is “diluted” by transparency. A higher alpha value means less transparency, and therefore a more opaque color.
When an alpha value is not specified, the default value is FF
, which represents 100%
opacity (i.e., the color is completely opaque and not transparent at all).
To specify an alpha value, simply add two hexadecimal digits before the six-digit color code. For example, #00CCFF
represents a fully opaque color, while #00CCFFDD
represents a partially transparent color (with an alpha value of DD
).
Example colors with transparency
Color Name | Hex Code | Description |
---|---|---|
Solid Red | #FF0000 | 100% opaque red |
50% Red | #80FF0000 | 50% transparent red |
75% Red | #C0FF0000 | 75% transparent red |
Transparent Red | #00FF0000 | Fully transparent red |
Solid Blue | #0000FF | 100% opaque blue |
50% Blue | #800000FF | 50% transparent blue |
75% Blue | #C00000FF | 75% transparent blue |
Transparent Blue | #000000FF | Fully transparent blue |
Solid Green | #00FF00 | 100% opaque green |
50% Green | #8000FF00 | 50% transparent green |
75% Green | #C000FF00 | 75% transparent green |
Transparent Green | #0000FF00 | Fully transparent green |
Solid Yellow | #FFFF00 | 100% opaque yellow |
50% Yellow | #80FFFF00 | 50% transparent yellow |
75% Yellow | #C0FFFF00 | 75% transparent yellow |
Transparent Yellow | #00FFFF00 | Fully transparent yellow |
Solid Magenta | #FF00FF | 100% opaque magenta |
50% Magenta | #80FF00FF | 50% transparent magenta |
75% Magenta | #C0FF00FF | 75% transparent magenta |
Transparent Magenta | #00FF00FF | Fully transparent magenta |
Gray | #FFCCCCCC | Non-transparent gray |
50% Gray | #80CCCCCC | 50% transparent gray |
75% Gray | #C0CCCCCC | 75% transparent gray |
Transparent Gray | #00CCCCCC | Fully transparent gray |
Full table for transparency AA
component of color
Transparency Level | AA component value |
---|---|
100% (main color is fully visible) | FF |
99% | FC |
98% | FA |
97% | F7 |
96% | F5 |
95% | F2 |
94% | F0 |
93% | ED |
92% | EB |
91% | E8 |
90% | E6 |
89% | E3 |
88% | E0 |
87% | DE |
86% | DB |
85% | D9 |
84% | D6 |
83% | D4 |
82% | D1 |
81% | CF |
80% | CC |
79% | C9 |
78% | C7 |
77% | C4 |
76% | C2 |
75% | BF |
74% | BD |
73% | BA |
72% | B8 |
71% | B5 |
70% | B3 |
69% | B0 |
68% | AD |
67% | AB |
66% | A8 |
65% | A6 |
64% | A3 |
63% | A1 |
62% | 9E |
61% | 9C |
60% | 99 |
59% | 96 |
58% | 94 |
57% | 91 |
56% | 8F |
55% | 8C |
54% | 8A |
53% | 87 |
52% | 85 |
51% | 82 |
50% | 80 |
49% | 7D |
48% | 7A |
47% | 78 |
46% | 75 |
45% | 73 |
44% | 70 |
43% | 6E |
42% | 6B |
41% | 69 |
40% | 66 |
39% | 63 |
38% | 61 |
37% | 5E |
36% | 5C |
35% | 59 |
34% | 57 |
33% | 54 |
32% | 52 |
31% | 4F |
30% | 4D |
29% | 4A |
28% | 47 |
27% | 45 |
26% | 42 |
25% | 40 |
24% | 3D |
23% | 3B |
22% | 38 |
21% | 36 |
20% | 33 |
19% | 30 |
18% | 2E |
17% | 2B |
16% | 29 |
15% | 26 |
14% | 24 |
13% | 21 |
12% | 1F |
11% | 1C |
10% | 1A |
9% | 17 |
8% | 14 |
7% | 12 |
6% | 0F |
5% | 0D |
4% | 0A |
3% | 08 |
2% | 05 |
1% | 03 |
0% (fully transparent, i.e. invisible) | 00 |
Fully invisible colors
You can use a color that makes your text completely invisible, but still searchable. This means the text won’t show up on the page, but it can be found by searching for it. This is handy for adding hidden marks to PDF files that you want to keep secret.
Color Name | Color Value | Description |
---|---|---|
Invisible | #00000000 | Invisible text, but searchable |
Copyright © 2016 - 2023 PDF.co