Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BIT-DataLab/Edit-Banana
/ rgb2hex
Function
rgb2hex
modules/basic_shape_processor.py:384–385 ·
view source on GitHub ↗
(rgb)
Source
from the content-addressed store, hash-verified
382
383
# RGB -> Hex
384
def
rgb2hex(rgb):
385
return
"#{:02x}{:02x}{:02x}"
.format(*rgb)
386
387
# 限制 stroke_width 在合理范围内(1-3),避免过粗的边框
388
stroke_width = min(3, max(1, stroke_width))
Callers
1
extract_style_colors
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected