badges / badges/poser

Add ability to change label color

Open
#80 12 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
146
Forks
44
PR merge metrics
No merged PRs in 30d

Description

### Feature Request

| Q | A
|------------ | ------
| New Feature | yes
| RFC | no
| BC Break | no

#### Summary
**As far as I know there is no way to change the label color (left part).**

I think it might be a great feature to be able to add a `?label_color=FFFFFF` to further customize the badge.
With `FFFFFF`: *the value of the color in hex.*

Shields.io support this (*[See 'styles' on shields.io](https://shields.io/#styles)*):
![Screenshot 2022-01-15 at 15 13 21](https://user-images.githubusercontent.com/67684689/149624946-1a50b7db-01dd-431c-9e7d-4dd1392c8370.png)

So it would give something like this:
```php
echo $poser->generate('license', 'MIT', 'FFFFFF', '428F7E', 'plastic');
// or
$image = $poser->generate('license', 'MIT', 'FFFFFF', '428F7E', 'plastic');
```
The default color should be the default grey/gray.

---
Original: [antonkomarev/github-profile-views-counter #40](https://github.com/antonkomarev/github-profile-views-counter/issues/40).

Contributor guide

Open the contributing guide

Research direction

Start at the public $poser->generate API shown in the issue and trace how badge colors are rendered. Check how the existing default grey is selected, then verify that an optional hexadecimal label color preserves the default when omitted and affects the generated badge as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.