| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -87,13 +87,29 @@ Overrides the default label color. You can pass a standard hex code (with or wit | |||
| 87 | 87 | - **Default**: `#0a0a0a` | |
| 88 | 88 | - **Usage**: `?labelColor=HEX_CODE` | |
| 89 | 89 | ||
| 90 | + ::note | ||
| 91 | + In URLs, `#` starts the fragment part. If you write `?labelColor=#000000`, the `#000000` part is treated as a fragment and the query value is lost. | ||
| 92 | + | ||
| 93 | + - Wrong: `.../badge/version/nuxt?labelColor=#000000` | ||
| 94 | + - Correct (URL-encoded `#`): `.../badge/version/nuxt?labelColor=%23000000` | ||
| 95 | + - Also correct (no prefix): `.../badge/version/nuxt?labelColor=000000` | ||
| 96 | + :: | ||
| 97 | + | ||
| 90 | 98 | ### `color` | |
| 91 | 99 | ||
| 92 | 100 | Overrides the default strategy color. You can pass a standard hex code (with or without the `#` prefix). The text color is automatically chosen (black or white) based on WCAG contrast ratio, so the badge remains readable. | |
| 93 | 101 | ||
| 94 | 102 | - **Default**: Depends on the badge type (e.g., version is blue, downloads are orange). | |
| 95 | 103 | - **Usage**: `?color=HEX_CODE` | |
| 96 | 104 | ||
| 105 | + ::note | ||
| 106 | + In URLs, `#` starts the fragment part. If you write `?color=#000000`, the `#000000` part is treated as a fragment and the query value is lost. | ||
| 107 | + | ||
| 108 | + - Wrong: `.../badge/version/nuxt?color=#000000` | ||
| 109 | + - Correct (URL-encoded `#`): `.../badge/version/nuxt?color=%23000000` | ||
| 110 | + - Also correct (no prefix): `.../badge/version/nuxt?color=000000` | ||
| 111 | + :: | ||
| 112 | + | ||
| 97 | 113 | | Example | URL | | |
| 98 | 114 | | :------------- | :------------------------------------ | | |
| 99 | 115 | | **Hot Pink** | `.../badge/version/nuxt?color=ff69b4` | | |
| Back | FazBrowse Home | New Git URL |
0 commit comments