Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add tegtBgColor and descColor as api parameter #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alicefromkr
Copy link

안녕하세요! Capsule Render 정말 잘 사용하고 있습니다!

뒤에 색상 없이 딱 이런 버튼 형태의 레이블을 서브헤더로 두고 싶었는데, textBgColor를 fontColor로 text color가 변경이 안되더라구요.
textBgColor를 request parameter로 추가하는게 어떨까요? 그리고 DescColor도 parameter 적용하면 더 다양하게 디자인 할 수 있어서 좋을 것 같습니다!

예시:
sample

감사합니다!

Copy link

vercel bot commented May 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
capsule-render ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 7:10am

Copy link
Owner

@kyechan99 kyechan99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요!
관심과 PR, 정말 감사드립니다 😄

확실히 기존 textBgColor 기능을 제공하지 않았기 때문에
제안해주신 내용은 충분히 좋은 내용입니다 !!!

다만 작성해주신 코드로 기존 API 결과물이 (크게는 아니지만) 달라지는 부분이 있어서요.
코멘트를 남겨두었으니 한번 확인해주세요!

Comment on lines -74 to +75
${textBg === "true" ? Model.textBg(fontColor, fontAlign || 50, fontAlignY || 50, fontSize, text) : ""}
${
textBg === "true"
? checkText(text, textBgColor, fontAlign, fontAlignY, stroke, strokeWidth)
: checkText(text, fontColor, fontAlign, fontAlignY, stroke, strokeWidth)
}`;
${textBg === "true" ? Model.textBg(textBgColor, fontAlign || 50, fontAlignY || 50, fontSize, text) : ""}
${checkText(text, fontColor, fontAlign, fontAlignY, stroke, strokeWidth)}`;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위 내용이 변경된 이유를 알 수 있을까요??

기존 결과물과 다르게 작동해요.

기존

https://capsule-render.vercel.app/api?type=rect&color=gradient&text=%20%20RECT%20%20&fontAlign=30&fontSize=30&textBg=true&desc=desc&descAlign=60&descAlignY=50

기존

변경 후

https://capsule-render-theta.vercel.app/api?type=rect&color=gradient&text=%20%20RECT%20%20&fontAlign=30&fontSize=30&textBg=true&desc=desc&descAlign=60&descAlignY=50

변경후

@kyechan99 kyechan99 added the feature new feature label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants